0.6.171 Router adds "Content-Encoding: gzip" even if the response content is raw/text
so our http-client gets baffled.
see below, some of the requests we tried... (few internal details have been removed/obscured) $ netcat router-host port GET /druid/v2/datasources/mydatasource?interval=2010-01-01/2016-01-01&full HTTP/1.1 User-Agent: curl/7.37.1 Host: host:port Accept: /
HTTP/1.1 200 OK Date: Wed, 25 Feb 2015 20:54:11 GMT Date: Wed, 25 Feb 2015 20:54:11 GMT Content-Type: application/json Content-Encoding: gzip Vary: Accept-Encoding, User-Agent Server: Jetty(9.2.5.v20141112) Content-Length: 1456
{..plain text json..}
$ netcat router-host port GET /druid/v2/datasources/mydatasource?interval=2010-01-01/2016-01-01&full HTTP/1.1 Accept-Encoding: Host: host:port
HTTP/1.1 200 OK Date: Wed, 25 Feb 2015 20:59:07 GMT Date: Wed, 25 Feb 2015 20:59:07 GMT Content-Type: application/json Content-Encoding: gzip Vary: Accept-Encoding, User-Agent Server: Jetty(9.2.5.v20141112) Content-Length: 1456
{..plain text json..}
$ netcat router-host port GET /druid/v2/datasources/mydatasource?interval=2010-01-01/2016-01-01&full HTTP/1.1 Host: host:port Accept-Encoding: gzip
HTTP/1.1 200 OK Date: Wed, 25 Feb 2015 21:07:47 GMT Date: Wed, 25 Feb 2015 21:07:47 GMT Content-Type: application/json Content-Encoding: gzip Vary: Accept-Encoding, User-Agent Server: Jetty(9.2.5.v20141112) Content-Length: 1456
{..plain text json..}
I thought we had fixed this already. Is this only for the datasources endpoint or also for query endpoints?
On Feb 27, 2015, at 08:34, Himanshu [email protected] wrote:
so our http-client gets baffled.
see below, some of the requests we tried... (few internal details have been removed/obscured) $ netcat router-host port GET /druid/v2/datasources/mydatasource?interval=2010-01-01/2016-01-01&full HTTP/1.1 User-Agent: curl/7.37.1 Host: host:port Accept: /
HTTP/1.1 200 OK Date: Wed, 25 Feb 2015 20:54:11 GMT Date: Wed, 25 Feb 2015 20:54:11 GMT Content-Type: application/json Content-Encoding: gzip Vary: Accept-Encoding, User-Agent Server: Jetty(9.2.5.v20141112) Content-Length: 1456
{..plain text json..}
$ netcat router-host port GET /druid/v2/datasources/mydatasource?interval=2010-01-01/2016-01-01&full HTTP/1.1 Accept-Encoding: Host: host:port
HTTP/1.1 200 OK Date: Wed, 25 Feb 2015 20:59:07 GMT Date: Wed, 25 Feb 2015 20:59:07 GMT Content-Type: application/json Content-Encoding: gzip Vary: Accept-Encoding, User-Agent Server: Jetty(9.2.5.v20141112) Content-Length: 1456
{..plain text json..}
$ netcat router-host port GET /druid/v2/datasources/mydatasource?interval=2010-01-01/2016-01-01&full HTTP/1.1 Host: host:port Accept-Encoding: gzip
HTTP/1.1 200 OK Date: Wed, 25 Feb 2015 21:07:47 GMT Date: Wed, 25 Feb 2015 21:07:47 GMT Content-Type: application/json Content-Encoding: gzip Vary: Accept-Encoding, User-Agent Server: Jetty(9.2.5.v20141112) Content-Length: 1456
{..plain text json..}
— Reply to this email directly or view it on GitHub.
Thanks for looking.
That is correct we are not seeing the issue on query endpoint (POST /druid/v2/)
Also, we are seeing it on 0.6.171. Did the fix go in 0.6 or in 0.7 only?
also pls point me to the commit, i'll backport it internally on 0.6 if required.
@himanshug See if the following PR fixes it for you in 0.6 https://github.com/druid-io/druid/pull/957/files Just adding the line here should fix your issue: https://github.com/druid-io/druid/pull/957/files#diff-564b553ed0071ba9c897abf6a7ca8b8fR129, but if you also want to have gzip compression for POST requests, you will need this as well https://github.com/druid-io/druid/pull/957/files#diff-f7b24049b9788368c23c082e1cb63e15R32
I'm rewriting the async query proxy servlet as we speak to remove the copy/pasted code from the jetty codebase, now that jetty has better methods to allow overriding, which should allow us to benefit from all the fixes in Jetty.
@himanshug I have updated the issue title to reflect that this has only been confirmed for 0.6.171
@xvrl sure, thanks
@himanshug I just tested, and 0.7.0 works as expected, so this only affects 0.6. If you are able to fix it for 0.6.x based on my earlier comment https://github.com/druid-io/druid/issues/1157#issuecomment-76458543, would you mind submitting a PR for 0.6.x? Thanks!
Closing this as I believe it is no longer an issue in master