Bug 177837

Summary: Share code to normalize an HTTP method
Product: WebKit Reporter: Daniel Bates <dbates>
Component: WebCore Misc.Assignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: All   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=177833
Attachments:
Description Flags
Patch none

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>