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): Fix logical operator priority to disallow GET/HEAD with non-empty body #1369

Merged
merged 1 commit into from Dec 6, 2021

Conversation

maxshirshin
Copy link
Contributor

@maxshirshin maxshirshin commented Nov 9, 2021

Purpose

There was a regression introduced in a conditional which checks for a body override in Request, where brackets were at the wrong place. Because of this, in certain cases, one could create a GET/HEAD Request instance with a non-empty body, which should normally result in an TypeError thrown.

Changes

This PR fixes the issue, and adds a test for this particular case.

Additional information


  • I added unit test(s)

@jimmywarting jimmywarting changed the title Fix logical operator priority (regression) to disallow GET/HEAD with non-empty body core(Request): Fix logical operator priority to disallow GET/HEAD with non-empty body Nov 9, 2021
@jimmywarting jimmywarting changed the title core(Request): Fix logical operator priority to disallow GET/HEAD with non-empty body fix(Request): Fix logical operator priority to disallow GET/HEAD with non-empty body Nov 9, 2021
LinusU
LinusU approved these changes Nov 10, 2021
@jimmywarting jimmywarting merged commit eb33090 into node-fetch:main Dec 6, 2021
8 checks passed
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.

None yet

3 participants