private void setResponseHeaders(DAVResource resource) { try { setResponseContentType(resource.getContentType()); } catch (SVNException e) { //nothing to do we just skip this header } setResponseHeader(ACCEPT_RANGES_HEADER, ACCEPT_RANGES_DEFAULT_VALUE); try { Date lastModifiedTime = resource.getLastModified(); if (lastModifiedTime != null) { setResponseHeader(LAST_MODIFIED_HEADER, SVNDate.formatRFC1123Date(lastModifiedTime)); } } catch (SVNException e) { //nothing to do we just skip this header } String eTag = resource.getETag(); if (eTag != null) { setResponseHeader(ETAG_HEADER, eTag); } } }
@Override public void execute() throws SVNException { readInput(false); DAVResource resource = getRequestedDAVResource(false, false); if (!resource.exists()) { sendError(HttpServletResponse.SC_NOT_FOUND, null); return; } try { setResponseContentType(resource.getContentType()); } catch (SVNException e) { //nothing to do we just skip this header } setResponseHeader(ACCEPT_RANGES_HEADER, ACCEPT_RANGES_DEFAULT_VALUE); try { Date lastModifiedTime = resource.getLastModified(); if (lastModifiedTime != null) { setResponseHeader(LAST_MODIFIED_HEADER, SVNDate.formatRFC1123Date(lastModifiedTime)); } } catch (SVNException e) { //nothing to do we just skip this header } String eTag = resource.getETag(); if (eTag != null) { setResponseHeader(ETAG_HEADER, eTag); } setResponseStatus(HttpServletResponse.SC_NO_CONTENT); }
value = SVNDate.formatRFC1123Date(getLastModifiedTime2(resource)); } catch (SVNException svne) { return DAVInsertPropAction.NOT_DEF;