WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
113283
Code duplication between HTTPParsers and HTTPValidation
https://bugs.webkit.org/show_bug.cgi?id=113283
Summary
Code duplication between HTTPParsers and HTTPValidation
Chris Dumez
Reported
2013-03-26 01:59:31 PDT
isRFC2616Token() from HTTPParsers and isValidHTTPToken() from HTTPValidation are doing exactly the same thing. We should refactor to avoid code duplication.
Attachments
Patch
(21.93 KB, patch)
2013-03-26 02:22 PDT
,
Chris Dumez
ap
: review+
Details
Formatted Diff
Diff
Patch for landing
(20.63 KB, patch)
2013-03-26 10:12 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2013-03-26 02:22:58 PDT
Created
attachment 195038
[details]
Patch
Alexey Proskuryakov
Comment 2
2013-03-26 09:48:48 PDT
Comment on
attachment 195038
[details]
Patch OK. We can consider splitting parsing and validation again if this file grows unwieldy. As far as naming goes, "isRFC2616Token" seems a little less descriptive to me than "isValidHTTPToken". The reason why I like the remaining name less is that one could wonder whether being an RFC2616 token is a built-in property of a String, like being atomic or being static. The other name reads a little more like a validity check that it is. But the difference is very small, and maybe it's just me thinking so.
Chris Dumez
Comment 3
2013-03-26 10:12:53 PDT
Created
attachment 195105
[details]
Patch for landing - Renamed to isValidHTTPToken().
WebKit Review Bot
Comment 4
2013-03-26 11:02:21 PDT
Comment on
attachment 195105
[details]
Patch for landing Clearing flags on attachment: 195105 Committed
r146908
: <
http://trac.webkit.org/changeset/146908
>
WebKit Review Bot
Comment 5
2013-03-26 11:02:27 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug