Repository navigation
fix(ext/fetch): only uppercase known methods - #30290
Conversation
|
Seems reasonable to me! And the addition of the null prototype for known methods is a good additional change. |
| "OPTIONS": "OPTIONS", | ||
| "options": "OPTIONS", | ||
| "PATCH": "PATCH", | ||
| "patch": "PATCH", |
There was a problem hiding this comment.
Is there a reason to remove this one?
There was a problem hiding this comment.
Yes. Without this change, patch would be converted to PATCH in the "fast case" of method normalization. PATCH is not on the list of methods which the fetch standard says should be normalized via uppercase. HTTP methods are case-sensitive, and patch and PATCH are not the same. You can test this by using fetch in Chrome.
|
@0f-0b could you please take another look? Looks like a Node test is now failing because of this change |
I don't see the error when running the tests locally. Could you perhaps rerun CI? |
Closes #30288.
@mitranim Please take a look to see if this is the correct fix.