Bug 177837 - Share code to normalize an HTTP method
Summary: Share code to normalize an HTTP method
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-10-03 14:08 PDT by Daniel Bates
Modified: 2017-10-03 16:37 PDT (History)
2 users (show)

See Also:


Attachments
Patch (6.01 KB, patch)
2017-10-03 14:12 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2017-10-03 14:08:42 PDT
Similar to the issue in bug #177833, we currently duplicate code in XMLHttpRequest and FetchRequest to normalize the name of an HTTP method. We should add a common helper function and update both classes to make use of it.
Comment 1 Daniel Bates 2017-10-03 14:12:40 PDT
Created attachment 322579 [details]
Patch

I named the common function normalizeHTTPMethod instead of normalizeMethod as I was worried that the latter could be ambigious given that it is a globally scoped function. Let me know if it would be preferred to name the funciton normalizeMethod or if there is a better name for this function.
Comment 2 Daniel Bates 2017-10-03 16:35:46 PDT
Comment on attachment 322579 [details]
Patch

Clearing flags on attachment: 322579

Committed r222819: <http://trac.webkit.org/changeset/222819>
Comment 3 Daniel Bates 2017-10-03 16:35:47 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2017-10-03 16:37:44 PDT
<rdar://problem/34802449>