Giter VIP home page Giter VIP logo

spring-gzip-filter's People

Contributors

leonardoxh avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

binyan17

spring-gzip-filter's Issues

ERR_CONTENT_DECODING_FAILED/Invalid Code Lengths Set

Thank you for the filter, I'm having an issue but I don't know if it's caused by this filter, spring, or maybe even the application server (WebSphere 8.5 Liberty Profile).

Basically, it works great when I hit a json/xml endpoint and get a 200 response, but when the endpoint throws an exception and returns an error, for example 400 Bad Request, Chrome shows an error ERR_CONTENT_DECODING_FAILED instead of displaying the actual 400 Bad Request text.

A similar issue happens if I use curl

> GET /services/sec/v1/aewf HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: localhost:9080
> Accept-Encoding: deflate, gzip
> Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
> 
< HTTP/1.1 400 Bad Request
< X-Powered-By: Servlet/3.0
< Content-Encoding: gzip
< Content-Type: text/html;charset=ISO-8859-1
< $WSEP: 
< Content-Language: en-US
< Transfer-Encoding: chunked
< Connection: Close
< Date: Fri, 24 Apr 2015 20:05:30 GMT
< 
* Error while processing content unencoding: invalid code lengths set
* Failed writing data
* Closing connection #0
curl: (23) Error while processing content unencoding: invalid code lengths set

Here it is without compression

> GET /services/sec/v1/aewf HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: localhost:9080
> Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
> 
< HTTP/1.1 400 Bad Request
< X-Powered-By: Servlet/3.0
< Content-Type: text/html;charset=ISO-8859-1
< $WSEP: 
< Content-Language: en-US
< Transfer-Encoding: chunked
< Connection: Close
< Date: Fri, 24 Apr 2015 20:14:59 GMT
< 
Error 400: SRVE0295E: Error reported: 400
* Closing connection #0

The Error 400: SRVE0295E: Error reported: 400 is what should be displayed in Chrome too.

Have you seen this before, or do you know of a way to only compress json/xml responses?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.