Jetty responds with 400 Bad Request when request Content-Type is gzip

北慕城南 提交于 2019-12-06 15:44:18

First, Remove GzipFilter from your web.xml it's not relevant anymore (starting with Jetty 9.3.0)

GzipHandler is the new replacement for all old filter based gzip filters (GzipFilter, AsyncGzipFilter, and IncludableGzipFilter).

It's been designed to function at a level more fundamental to the connection streams, something that the filter based approaches could not do in the world of Async I/O.

That being said ... GzipHandler in Jetty 9.3.0 only has an implementation designed for the Response body content. (Just like the GzipFilters of before)

What we learned however, is that some projects extended our GzipFilter to add Request content body gzip handling as well. Which our change from GzipFilter to GzipHandler broke.

We have an open bug about that at https://bugs.eclipse.org/471577 (DropWizard extended GzipFilter for their own BiDiGzipFilter)

We recognize that there could be some useful functions for Gzip on the request content body, but we don't have an implementation for that yet. (hint, hint, drop a patch on us)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!