Update to jetty 9.4; Enable request decompression#5624
Update to jetty 9.4; Enable request decompression#5624jon-wei merged 2 commits intoapache:masterfrom
Conversation
There was a problem hiding this comment.
does the buffer size needs to be configurable ?
64cebd9 to
eb0e9a2
Compare
|
@nishantmonu51 the buffer size is now configurable, and add an compression level option to solve #5534 Also added docs and unit tests. |
97ed14a to
e213caa
Compare
|
Please check the integration test failure. |
2ad349c to
5daa683
Compare
|
@jihoonson @nishantmonu51 I leaved a quick fix in the newest commit of the PR. |
There was a problem hiding this comment.
Can you add a test where the request has Accept-Encoding:gzip and the server sends a gzip compressed response back?
There was a problem hiding this comment.
@jon-wei
+1 This is supposed to be done by existing method testGzipCompression(), I added some content checking asserts to that method.
Also changed the relevant test method name to avoid confusing.
There was a problem hiding this comment.
Can you make 4096 a static constant in ServerConfig, maybe DEFAULT_GZIP_INFLATE_BUFFER_SIZE
c30b40e to
eaa12ac
Compare
eaa12ac to
0c1b0e7
Compare
* Update to jetty 9.4; Enable request decompression; Add http compression config options * Fix BadMessageException from jetty server at HttpGenerator.generateHeaders(...)
|
|
||
| final HandlerList handlerList = new HandlerList(); | ||
| handlerList.setHandlers(new Handler[]{JettyServerInitUtils.wrapWithDefaultGzipHandler(root)}); | ||
| handlerList.setHandlers(new Handler[]{JettyServerInitUtils.wrapWithDefaultGzipHandler(root, 4096, -1)}); |
There was a problem hiding this comment.
Should have used ServerConfig.DEFAULT_GZIP_INFLATE_BUFFER_SIZE and Deflater.DEFAULT_COMPRESSION instead of magic constants
Automatic request decompression is implemented since Jetty-964,to use this feature, a dependency upgrading of jetty from 9.3 to 9.4 is needed.