mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-10 00:26:52 +01:00
Set content encoding header when compressed
This commit is contained in:
@@ -17,6 +17,7 @@ public class GZipResponseFilter implements ContainerResponseFilter {
|
||||
if (WebUtil.isGzipSupported(requestContext::getHeaderString)) {
|
||||
log.trace("compress output with gzip");
|
||||
GZIPOutputStream wrappedResponse = new GZIPOutputStream(responseContext.getEntityStream());
|
||||
responseContext.getHeaders().add("Content-Encoding", "gzip");
|
||||
responseContext.setEntityStream(wrappedResponse);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user