Skip to content
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

Fix bug parsing response into header and body #523

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bch36
Copy link

@bch36 bch36 commented Oct 10, 2024

The response variable may contain binary data, making mb_substr the incorrect function to use. Pre PHP 8.3.2, mb_substr would encounter invalid UTF characters in the binary data and fall back to using substr, but from 8.3.2 on, the behavior of mb_substr has changed to replacing the invalid UTF characters with "?". This results in corrupted binary data.

See issue #522

The response variable may contain binary data, making mb_substr the incorrect function to use. Pre PHP 8.3.2, mb_substr would encounter invalid UTF characters in the binary data and fall back to using substr, but from 8.3.2 on, the behavior of mb_substr has changed to replacing the invalid UTF characters with "?". This results in corrupted binary data.
@UVLabs
Copy link

UVLabs commented Oct 24, 2024

@abisalehalliprasan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants