code: @HEAD
     @Path("/{repoName}/{repoPath:.*}/")
     public Response head(@PathParam("repoName") String repoName, @PathParam("repoPath") String repoPath,
        @Context UriInfo uriInfo)
     {
  
        if (log.isDebugEnabled())
        {
           log.debug("HEAD " + repoName + "/" + repoPath);
        }
  
        repoPath = normalizePath(repoPath);
  
        try
        {
           repoName = getRepositoryName(repoName);
           Session session = session(repoName, workspaceName(repoPath), null);
           String uri =
              uriInfo.getBaseUriBuilder().path(getClass()).path(repoName).path(workspaceName(repoPath)).build()
                 .toString();
           return new HeadCommand().head(session, path(repoPath), uri);
        }
        catch (NoSuchWorkspaceException exc)
        {
           log.error("NoSuchWorkspaceException " + exc.getMessage(), exc);
           return Response.status(HTTPStatus.NOT_FOUND).entity(exc.getMessage()).build();
        }
        catch (Exception exc)
        {
           log.error(exc.getMessage(), exc);
           return Response.serverError().entity(exc.getMessage()).build();
        }
     }
docs: WedDAV "HEAD" method. see <a
  href='http://www.ietf.org/rfc/rfc2518.txt'>HTTP methods for distributed
  authoring sec. 8.4 "GET, HEAD for Collections"</a>.
  
  @param repoName repository name
  @param repoPath path in repository
  @return the instance of javax.ws.rs.core.Response
  @LevelAPI Platform