fetch
fetch copied to clipboard
Add some missed methods which should be normalized as uppercase
Recently I found that the polyfill for fetch()
has not normalized the patch
method as uppercase, and it seems like a bug like native implementation. Should we add some request methods to solve this problem?
REF: https://github.com/nodejs/help/issues/2184
Här är några tider som fungerar för mig:
söndag 3 april 2022
23:00 - 00:00 (GMT+2)
Enkelt med Outlookhttps://aka.ms/Dcupce
Hämta Outlook för Androidhttps://aka.ms/AAb9ysg
Från: Aleen @.> Skickat: fredag 1 april 2022 16:07 Till: github/fetch @.> Kopia: Subscribed @.***> Ämne: [github/fetch] Add some missed methods which should be normalized (PR #1119)
Recently I found that the polyfill for fetch() has not normalized the patch method as uppercase, and it seems like a bug like native implementation. Should we add some request methods to solve this problem?
You can view, comment on, or merge this pull request online at:
Commit Summary
- 98c8f7ahttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgithub%2Ffetch%2Fpull%2F1119%2Fcommits%2F98c8f7a514082d49625d040f2139424800c7f0ef&data=04%7C01%7C%7Cc43d9ca2724347bc125a08da13e8e3ae%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637844188209086913%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=dwP6gbd063V8KQHvbr%2B33jNJKMA4uX%2FHWrYDtv8Vb8g%3D&reserved=0 Add some missed methods which should be normalized
File Changes
Patch Links:
- https://github.com/github/fetch/pull/1119.patchhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgithub%2Ffetch%2Fpull%2F1119.patch&data=04%7C01%7C%7Cc43d9ca2724347bc125a08da13e8e3ae%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637844188209243114%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=OpQQU0LRqxpInRX9if62m9LzltGPqv9BUwFJN9Nu1SM%3D&reserved=0
- https://github.com/github/fetch/pull/1119.diffhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgithub%2Ffetch%2Fpull%2F1119.diff&data=04%7C01%7C%7Cc43d9ca2724347bc125a08da13e8e3ae%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637844188209243114%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=NJSi8AwwTtuG3hCrbHlgqL8vwoaH6TJ%2FuVVPNwzyxCs%3D&reserved=0
— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgithub%2Ffetch%2Fpull%2F1119&data=04%7C01%7C%7Cc43d9ca2724347bc125a08da13e8e3ae%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637844188209243114%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=gY7GMYi0TkqnmL9uZqRcgfFTS6MAXxhCtGRFYFDa8zs%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAROOKRWD57LECRIQMSATN3TVC37IHANCNFSM5SIZXNPQ&data=04%7C01%7C%7Cc43d9ca2724347bc125a08da13e8e3ae%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637844188209243114%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=f4CKAYbxjoLnPziOLwkQPNTmqdVLxW381wpylZtx7p4%3D&reserved=0. You are receiving this because you are subscribed to this thread.Message ID: @.***>
......................................................................................................................................... Join online meetinghttps://join.skype.com/kCMP4N3C5jvr .........................................................................................................................................
fetch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fetch.js b/fetch.js index ce474a03..a2cbe7ad 100644 --- a/fetch.js +++ b/fetch.js @@ -329,7 +329,7 @@ function Body() { }
// HTTP methods whose capitalization should be normalized -var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'] +var methods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE']
function normalizeMethod(method) { var upcased = method.toUpperCase()
@JakeChampion is it possible to have this be merged? This still exists as a problem and this PR solves it.
As an aside, is the API not being updated? Haven't seen an update in 2 years.