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: Do not throw an TypeError on numeric HTTP headers #1370

Merged
merged 3 commits into from
Sep 20, 2022

Conversation

cleptric
Copy link
Member

Fixes #1369

While I'm not entirely sure if numeric headers are in sync with the spec, we should definitely not throw an TypeError in this case.

Copy link
Collaborator

@Jean85 Jean85 left a comment

Choose a reason for hiding this comment

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

PHP implicitly converts integer strings to integers when using it for array keys, that's the key of the issue.

Fixing the PHPDoc would make the issue surface at the static analysis level.

src/Integration/RequestIntegration.php Outdated Show resolved Hide resolved
cleptric and others added 2 commits September 20, 2022 16:02
Co-authored-by: Alessandro Lai <alessandro.lai85@gmail.com>
@cleptric cleptric merged commit 83e50c8 into master Sep 20, 2022
@cleptric cleptric deleted the mh/numeric-headers branch September 20, 2022 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error in RequestIntegration when HTTP header name is numeric
3 participants