How to decode Gzip compressed request body in Spring MVC

后端 未结 3 2042
情话喂你
情话喂你 2020-12-03 06:05

I have a client that sends data with

CONTENT-ENCODING deflate

I have code like this

@RequestMapping(value = \"/connect\",          


        
3条回答
  •  长情又很酷
    2020-12-03 06:17

    You don't handle it in Spring. Instead you use a filter so that the data arrives in Spring already deflated.

    Hopefully these two links can get you started.

    • http://www.javablog.fr/javaweb-gzip-compression-protocol-http-filter-gzipresponsewrapper-gzipresponsewrapper.html
    • http://srlawr.blogspot.com/2011/09/creating-custom-filter-in-spring.html

提交回复
热议问题