mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-03 04:19:12 +00:00
Issue #491 Do not assume gzip acceptable for HTTP/2
Removed the HTTP/2 specific code for #491
This commit is contained in:
parent
b047c6332e
commit
4b94aa2c97
@ -260,23 +260,20 @@ public class GzipHandler extends HandlerWrapper implements GzipFactory
|
||||
return null;
|
||||
}
|
||||
|
||||
// If not HTTP/2, then we must check the accept encoding header
|
||||
if (request.getHttpVersion()!=HttpVersion.HTTP_2)
|
||||
// check the accept encoding header
|
||||
HttpField accept = request.getHttpFields().getField(HttpHeader.ACCEPT_ENCODING);
|
||||
|
||||
if (accept==null)
|
||||
{
|
||||
HttpField accept = request.getHttpFields().getField(HttpHeader.ACCEPT_ENCODING);
|
||||
LOG.debug("{} excluded !accept {}",this,request);
|
||||
return null;
|
||||
}
|
||||
boolean gzip = accept.contains("gzip");
|
||||
|
||||
if (accept==null)
|
||||
{
|
||||
LOG.debug("{} excluded !accept {}",this,request);
|
||||
return null;
|
||||
}
|
||||
boolean gzip = accept.contains("gzip");
|
||||
|
||||
if (!gzip)
|
||||
{
|
||||
LOG.debug("{} excluded not gzip accept {}",this,request);
|
||||
return null;
|
||||
}
|
||||
if (!gzip)
|
||||
{
|
||||
LOG.debug("{} excluded not gzip accept {}",this,request);
|
||||
return null;
|
||||
}
|
||||
|
||||
Deflater df = _deflater.get();
|
||||
|
Loading…
x
Reference in New Issue
Block a user