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: request.headers for http2 cannot be deepmerged #275

Merged

Conversation

mccare
Copy link
Contributor

@mccare mccare commented Sep 30, 2021

node http2 server initializes headers with Object.create(null) and
they do not have the propertyIsEnumerable method. This method is needed by
deepmerge.

See Issue #274

Checklist

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

Can you please add a unit test?

@mccare mccare marked this pull request as draft September 30, 2021 16:58
node http2 server initializes headers with Object.create(null) and
they not have the propertyIsEnumerable method. This method is needed by
deepmerge.

Also added unit test for http2 request.
@mccare mccare force-pushed the http2-request-headers-cannot-be-deepmerged branch from 828feb8 to b526314 Compare October 5, 2021 17:22
@mccare mccare requested a review from mcollina October 5, 2021 17:22
@mccare mccare marked this pull request as ready for review October 5, 2021 17:22
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina merged commit 3716575 into fastify:master Oct 7, 2021
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