8000 Fix content deflating for IIS HTTP responses by blat · Pull Request #71 · laminas/laminas-http · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix content deflating for IIS HTTP responses #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 11, 2022
Merged

Conversation

blat
Copy link
Contributor
@blat blat commented Nov 7, 2022
Q A
Bugfix yes
BC Break no

Description

Some response coming from IIS are using gzuncompress instead of gzinflate.

Note: This fix was already fixed 10 years ago on ZF1 zendframework/zf1@1e158aa but this this was not ported in ZF2.
See: https://framework.zend.com/issues/browse/ZF-12457.html

To reproduce:

use Laminas\Http\Client;
$client = new Client('https://www.vnews.com/With-Federal-Money-Running-Out-Lebanon-Starts-to-Pick-Up-Motel-Tabs-for-Homeless-48667855');
echo $client->send()->getBody();

Current result:

PHP Warning: gzuncompress(): data error in vendor/laminas/laminas-http/src/Response.php on line 653

@Ocramius Ocramius added the Bug Something isn't working label Nov 7, 2022
@Ocramius Ocramius added this to the 2.16.1 milestone Nov 7, 2022
@froschdesign
Copy link
Member

@blat
You are using the wrong branch because 2.17.0 is the last release, not 2.16.
See also in the contributing guidelines: What branch to issue the pull request against?

@blat
Copy link
Contributor Author
blat commented Nov 8, 2022

@froschdesign

PHP7 is not supported by 2.17.x release.
No plan for a 2.16.1?

@froschdesign
Copy link
Member

PHP7 is not supported by 2.17.x release.

Why? PHP 7 is dead.

@blat
Copy link
Contributor Author
blat commented Nov 8, 2022

Yes, I know PHP7 will be EOL at the end of the month. I'm current working on this upgrade ;)
In the meantime, a 2.16.1 will be appreciated!

Copy link
Member
@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor adjustments needed.

@froschdesign I'd be OK with merging this to an old-stable, as an exception: the contributor has put time to fix in it, and the merge-up should be straightforward too. WDYT?

@froschdesign
Copy link
Member

@Ocramius

…the contributor has put time to fix in it, and the merge-up should be straightforward too.

I agree with that. 👍🏻

@blat
Copy link
Contributor Author
blat commented Nov 9, 2022

I've updated with the smaller example I was able to found.

Thank you!

@Ocramius Ocramius self-assigned this Nov 11, 2022
Copy link
Member
@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @blat! Releasing now :)

@Ocramius Ocramius changed the title Fix Response::decodeDeflate Fix content deflating for IIS HTTP responses Nov 11, 2022
@Ocramius Ocramius merged commit 838825d into laminas:2.16.x Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment 6508
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0