This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 86
Fix: decompressed response saved into file when streaming #199
Merged
michalbundyra
merged 1 commit into
zendframework:master
from
michalbundyra:hotfix/stream-compressed-response
Dec 2, 2019
Merged
Fix: decompressed response saved into file when streaming #199
michalbundyra
merged 1 commit into
zendframework:master
from
michalbundyra:hotfix/stream-compressed-response
Dec 2, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When we set stream we'd like to get decompressed resource in the file. Fixes #91
@@ -1184,7 +1184,7 @@ protected function prepareHeaders($body, $uri) | |||
// Set the Accept-encoding header if not set - depending on whether | |||
// zlib is available or not. | |||
if (! $this->getRequest()->getHeaders()->has('Accept-Encoding')) { | |||
if (function_exists('gzinflate')) { | |||
if (empty($this->config['outputstream']) && function_exists('gzinflate')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious: can you explain why this is needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the test - we'd like to have uncompressed content stored in the file if we are using streams and we set the file.
weierophinney
approved these changes
Dec 2, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
michalbundyra
added a commit
that referenced
this pull request
Dec 2, 2019
…esponse Fix: decompressed response saved into file when streaming
michalbundyra
added a commit
that referenced
this pull request
Dec 2, 2019
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
master
branch, and submit against that branch.CHANGELOG.md
entry for the fix.When we set stream we'd like to get decompressed resource in the file.
Fixes #91
/cc @zerocrates