I'm not sure thats
true:
https://github.com/dropwizard/dropwizard/blob/3d746d21c6e6656a59b26c2a7e92f19e1bb2e9b1/dropwizard-jersey/src/main/java/io/dropwizard/jersey/gzip/ConfiguredGZipEncoder.java
Dropwizard by default forces gzip encoding with this file. Strangely
though if I attempt to set the Content-Encoding header:
this._baseTarget.path(String.format("resources/%s.json", resourceId))
.request(MediaType.APPLICATION_JSON_TYPE)
.header(HttpHeaders.CONTENT_ENCODING, "none")
.put(Entity.entity(body, MediaType.APPLICATION_JSON_TYPE));
ConfiguredGZipEncoder does not see the CONTENT_ENCODING header set. In
debugging I found that it reads the header as null and ends up setting gzip.
On Monday, May 9, 2016 at 1:04:07 PM UTC-7, Volkan Yazıcı wrote:
>
> Hey Joe!
>
> I don't know the answer, but I would try Apache Jersey mailing list or
> Stack Overflow for an answer.
> This is not really a Dropwizard-specific question.
>
> Best.
>
> On Sunday, May 8, 2016 at 3:12:40 AM UTC+2, Joe Mifsud wrote:
>>
>> Is it possible to disable gzip encoding on a single request from a
>> (Jersey) dropwizard client?
>>
>> Response response =
>> this._baseTarget.path(String.format("resources/%s.json", resourceId))
>> .request(MediaType.APPLICATION_JSON_TYPE)
>> .put(Entity.entity(body,
>> MediaType.APPLICATION_JSON_TYPE));
>>
>>
>> I'm aware of the jerseyClient / gzipEnabledForRequests flag. I'd like to
>> keep this to true and manually turn it off for a few requests. Is this
>> possible?
>>
>> Thanks,
>> Joe Mifsud
>>
>
--
You received this message because you are subscribed to the Google Groups
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.