How to disable automatic unzipping of gzip encoded content in Play WSHow do I create a Java string from the contents of a file?How should I handle searching through byte arrays in Java?How to configure encoding in Maven?Handling gzipped content on Androidjava.io.EOFException: Unexpected end of ZLIB input stream reading gzip encoded websiteGetting the response's true wire size from a jersey clientof a HTTP jersey response that is chunked and gzipped by a filterSpring RestTemplate Large Files ContentLength Auto ChangedSpring Cloud Netflix Feign content encoding not workingTomcat 8 Disable Chunked Encoding Filterjava.nio.ScoketChannel ignores Content-Length and uses Transfer-Encoding: chunked based on User-Agent
Why does nature favour the Laplacian?
Why was the Spitfire's elliptical wing almost uncopied by other aircraft of World War 2?
Is there really no use for MD5 anymore?
Was there a Viking Exchange as well as a Columbian one?
Why does processed meat contain preservatives, while canned fish needs not?
What route did the Hindenburg take when traveling from Germany to the U.S.?
What's the polite way to say "I need to urinate"?
What is the difference between `command a[bc]d` and `command `ab,cd`
How would one muzzle a full grown polar bear in the 13th century?
How to verbalise code in Mathematica?
How to make a pipeline wait for end-of-file or stop after an error?
Does a semiconductor follow Ohm's law?
How do I deal with a coworker that keeps asking to make small superficial changes to a report, and it is seriously triggering my anxiety?
Stop and Take a Breath!
Controversial area of mathematics
How to have a sharp product image?
What is the most expensive material in the world that could be used to create Pun-Pun's lute?
Why is it that the natural deduction method can't test for invalidity?
How can Republicans who favour free markets, consistently express anger when they don't like the outcome of that choice?
The Defining Moment
Examples of non trivial equivalence relations , I mean equivalence relations without the expression " same ... as" in their definition?
Rivers without rain
How to get a plain text file version of a CP/M .BAS (M-BASIC) program?
Contradiction proof for inequality of P and NP?
How to disable automatic unzipping of gzip encoded content in Play WS
How do I create a Java string from the contents of a file?How should I handle searching through byte arrays in Java?How to configure encoding in Maven?Handling gzipped content on Androidjava.io.EOFException: Unexpected end of ZLIB input stream reading gzip encoded websiteGetting the response's true wire size from a jersey clientof a HTTP jersey response that is chunked and gzipped by a filterSpring RestTemplate Large Files ContentLength Auto ChangedSpring Cloud Netflix Feign content encoding not workingTomcat 8 Disable Chunked Encoding Filterjava.nio.ScoketChannel ignores Content-Length and uses Transfer-Encoding: chunked based on User-Agent
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
Pretty much just the title. Any web call I make that returns content that's gzip encoded gets automatically unzipped. I have a route that just wants to proxy through the upstream content without unzipping and rezipping it.
Furthermore, I want to stream the content through, so the fundamental problem I'm trying to solve is that my content lengths between upstream and downstream don't match! Upstream content length is, let's say, 1000. But that's gzipped. I don't know what the downstream content length is going to be until I've finished parsing the entire upstream, but I don't want to hold it all in memory. So now I can't even set content length for the downstream response and have to send the data chunked. I want to be able to set the content length on the downstream and additionally I don't want to unzip/rezip the content anyway.
If I could tell the WSClient to ignore the content-encoding header and just pass through the gzipped content that would be perfect.
java playframework play-ws
add a comment |
Pretty much just the title. Any web call I make that returns content that's gzip encoded gets automatically unzipped. I have a route that just wants to proxy through the upstream content without unzipping and rezipping it.
Furthermore, I want to stream the content through, so the fundamental problem I'm trying to solve is that my content lengths between upstream and downstream don't match! Upstream content length is, let's say, 1000. But that's gzipped. I don't know what the downstream content length is going to be until I've finished parsing the entire upstream, but I don't want to hold it all in memory. So now I can't even set content length for the downstream response and have to send the data chunked. I want to be able to set the content length on the downstream and additionally I don't want to unzip/rezip the content anyway.
If I could tell the WSClient to ignore the content-encoding header and just pass through the gzipped content that would be perfect.
java playframework play-ws
add a comment |
Pretty much just the title. Any web call I make that returns content that's gzip encoded gets automatically unzipped. I have a route that just wants to proxy through the upstream content without unzipping and rezipping it.
Furthermore, I want to stream the content through, so the fundamental problem I'm trying to solve is that my content lengths between upstream and downstream don't match! Upstream content length is, let's say, 1000. But that's gzipped. I don't know what the downstream content length is going to be until I've finished parsing the entire upstream, but I don't want to hold it all in memory. So now I can't even set content length for the downstream response and have to send the data chunked. I want to be able to set the content length on the downstream and additionally I don't want to unzip/rezip the content anyway.
If I could tell the WSClient to ignore the content-encoding header and just pass through the gzipped content that would be perfect.
java playframework play-ws
Pretty much just the title. Any web call I make that returns content that's gzip encoded gets automatically unzipped. I have a route that just wants to proxy through the upstream content without unzipping and rezipping it.
Furthermore, I want to stream the content through, so the fundamental problem I'm trying to solve is that my content lengths between upstream and downstream don't match! Upstream content length is, let's say, 1000. But that's gzipped. I don't know what the downstream content length is going to be until I've finished parsing the entire upstream, but I don't want to hold it all in memory. So now I can't even set content length for the downstream response and have to send the data chunked. I want to be able to set the content length on the downstream and additionally I don't want to unzip/rezip the content anyway.
If I could tell the WSClient to ignore the content-encoding header and just pass through the gzipped content that would be perfect.
java playframework play-ws
java playframework play-ws
asked Mar 22 at 18:22
K. MK. M
268410
268410
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55305724%2fhow-to-disable-automatic-unzipping-of-gzip-encoded-content-in-play-ws%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55305724%2fhow-to-disable-automatic-unzipping-of-gzip-encoded-content-in-play-ws%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown