Skip to content

Used gzdecode() instead of gzinflate() for better compatibility. #109

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 1 commit into from
May 6, 2025

Conversation

Daniel-KM
Copy link

Q A
Documentation no
Bugfix yes
BC Break no
New Feature no
RFC no
QA no

Description

When the http response is gzipped, the uncompression process should use gzdecode(), that manages more encoding subtilities in headers than gzinflate().

The url i tried is https://pub.federation.renater.fr/metadata/test/preview/preview-idps-test-metadata.xml, that is gzipped when the laminas http client allows it, but gzinflate() cannot uncompress it. gzdecode() works with any other urls that is http gzipped.

Daniel-KM pushed a commit to Daniel-KM/Omeka-S-module-SingleSignOn that referenced this pull request May 2, 2025
@froschdesign froschdesign requested a review from Xerkus May 5, 2025 11:16
@Xerkus
Copy link
Member

Xerkus commented May 6, 2025

Makes sense. gzip magic bytes header or checksum are probably getting in the way and are not understood by the gzinflate() that is just straight up deflate with no fluff.

@Xerkus Xerkus added Bug Something isn't working and removed Review Needed labels May 6, 2025
@Xerkus Xerkus added this to the 2.21.1 milestone May 6, 2025
@Xerkus Xerkus changed the base branch from 2.22.x to 2.21.x May 6, 2025 08:18
@Xerkus Xerkus changed the base branch from 2.21.x to 2.22.x May 6, 2025 08:23
@Xerkus Xerkus modified the milestones: 2.21.1, 2.22.0 May 6, 2025
@Xerkus Xerkus merged commit 5052177 into laminas:2.22.x May 6, 2025
12 checks passed
@froschdesign
Copy link
Member

@Daniel-KM @Xerkus
Thank you! 👍🏻

@Daniel-KM Daniel-KM deleted the fix/gunzip_body branch May 7, 2025 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants