/** * Prepare response with payload headers. */ private void prepareResponseWithPayload(final FileCacheEntry entry, final HttpResponsePacket response, final boolean isServeCompressed) throws IOException { response.addHeader(Header.ETag, entry.Etag); response.addHeader(Header.LastModified, entry.lastModifiedHeader); response.setContentLengthLong(entry.getFileSize(isServeCompressed)); if (isServeCompressed) { response.addHeader(Header.ContentEncoding, "gzip"); } }
/** * Add the specified header to the specified value. * * @param name Name of the header to set * @param value Value to be set */ public void addHeader(final String name, final String value) { checkResponse(); if (isCommitted()) return; response.addHeader(name, value); }
/** * Prepares common response headers. */ private void prepareResponse(final FileCacheEntry entry, final HttpResponsePacket response) throws IOException { response.setContentType(entry.contentType.prepare()); if (entry.server != null) { response.addHeader(Header.Server, entry.server); } }
/** * Prepares common response headers. */ private void prepareResponse(final FileCacheEntry entry, final HttpResponsePacket response) throws IOException { response.setContentType(entry.contentType.prepare()); if (entry.server != null) { response.addHeader(Header.Server, entry.server); } }
/** * Add the specified header to the specified value. * * @param name Name of the header to set * @param value Value to be set */ public void addHeader(final String name, final String value) { checkResponse(); if (isCommitted()) return; response.addHeader(name, value); }
/** * Prepares common response headers. */ private void prepareResponse(final FileCacheEntry entry, final HttpResponsePacket response) throws IOException { response.setContentType(entry.contentType.prepare()); if (entry.server != null) { response.addHeader(Header.Server, entry.server); } }
/** * Prepares common response headers. */ private void prepareResponse(final FileCacheEntry entry, final HttpResponsePacket response) throws IOException { response.setContentType(entry.contentType.prepare()); if (entry.server != null) { response.addHeader(Header.Server, entry.server); } }
/** * Prepares common response headers. */ private void prepareResponse(final FileCacheEntry entry, final HttpResponsePacket response) throws IOException { response.setContentType(entry.contentType.prepare()); if (entry.server != null) { response.addHeader(Header.Server, entry.server); } }
/** * Add the specified header to the specified value. * * @param name Name of the header to set * @param value Value to be set */ public void addHeader(final String name, final String value) { checkResponse(); if (isCommitted()) return; response.addHeader(name, value); }
/** * Prepares common response headers. */ private void prepareResponse(final FileCacheEntry entry, final HttpResponsePacket response) throws IOException { response.setContentType(entry.contentType.prepare()); if (entry.server != null) { response.addHeader(Header.Server, entry.server); } }
/** * Add the specified header to the specified value. * * @param name Name of the header to set * @param value Value to be set */ public void addHeader(final String name, final String value) { checkResponse(); if (isCommitted()) return; response.addHeader(name, value); }
/** * Add the specified header to the specified value. * * @param name Name of the header to set * @param value Value to be set */ public void addHeader(final String name, final String value) { checkResponse(); if (isCommitted()) return; response.addHeader(name, value); }
/** * Prepares common response headers. */ private void prepareResponse(final FileCacheEntry entry, final HttpResponsePacket response) throws IOException { response.setContentType(entry.contentType.prepare()); if (entry.server != null) { response.addHeader(Header.Server, entry.server); } }
/** * Add the specified header to the specified value. * * @param name Name of the header to set * @param value Value to be set */ public void addHeader(final String name, final String value) { checkResponse(); if (isCommitted()) return; response.addHeader(name, value); }
/** * Prepares common response headers. */ private void prepareResponse(final FileCacheEntry entry, final HttpResponsePacket response) throws IOException { response.setContentType(entry.contentType.prepare()); if (entry.server != null) { response.addHeader(Header.Server, entry.server); } }
/** * Prepares common response headers. */ private void prepareResponse(final FileCacheEntry entry, final HttpResponsePacket response) throws IOException { response.setContentType(entry.contentType.prepare()); if (entry.server != null) { response.addHeader(Header.Server, entry.server); } }
/** * Add the specified header to the specified value. * * @param name Name of the header to set * @param value Value to be set */ public void addHeader(final String name, final String value) { checkResponse(); if (isCommitted()) return; response.addHeader(name, value); }
/** * Prepares common response headers. */ private void prepareResponse(final FileCacheEntry entry, final HttpResponsePacket response) throws IOException { response.setContentType(entry.contentType.prepare()); if (entry.server != null) { response.addHeader(Header.Server, entry.server); } }
/** * Add the specified header to the specified value. * * @param name Name of the header to set * @param value Value to be set */ public void addHeader(final String name, final String value) { checkResponse(); if (isCommitted()) return; response.addHeader(name, value); }
/** * Prepares common response headers. */ private void prepareResponse(final FileCacheEntry entry, final HttpResponsePacket response) throws IOException { response.setContentType(entry.contentType.prepare()); if (entry.server != null) { response.addHeader(Header.Server, entry.server); } }