Bug 159508 - [Fetch API] Response constructor should throw in case of bad reason phrase
Summary: [Fetch API] Response constructor should throw in case of bad reason phrase
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords:
Depends on:
Blocks: 151937
  Show dependency treegraph
 
Reported: 2016-07-07 01:57 PDT by youenn fablet
Modified: 2016-07-07 09:24 PDT (History)
1 user (show)

See Also:


Attachments
Patch (6.18 KB, patch)
2016-07-07 02:05 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (6.22 KB, patch)
2016-07-07 08:54 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2016-07-07 01:57:57 PDT
We should validate reason phrase as per https://tools.ietf.org/html/rfc7230#section-3.1.2
Comment 1 youenn fablet 2016-07-07 02:05:07 PDT
Created attachment 282999 [details]
Patch
Comment 2 Alex Christensen 2016-07-07 08:47:21 PDT
Comment on attachment 282999 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=282999&action=review

> Source/WebCore/platform/network/HTTPParsers.cpp:105
> +bool isValidReasonPhrase(const String& value)

The other functions like this have a comment.  I think this needs one, too.
// See RFC 7230, Section 3.1.2.
Comment 3 youenn fablet 2016-07-07 08:54:12 PDT
Created attachment 283017 [details]
Patch for landing
Comment 4 youenn fablet 2016-07-07 08:54:38 PDT
Thanks for the review.

(In reply to comment #2)
> Comment on attachment 282999 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=282999&action=review
> 
> > Source/WebCore/platform/network/HTTPParsers.cpp:105
> > +bool isValidReasonPhrase(const String& value)
> 
> The other functions like this have a comment.  I think this needs one, too.
> // See RFC 7230, Section 3.1.2.

Done
Comment 5 WebKit Commit Bot 2016-07-07 09:24:52 PDT
Comment on attachment 283017 [details]
Patch for landing

Clearing flags on attachment: 283017

Committed r202910: <http://trac.webkit.org/changeset/202910>
Comment 6 WebKit Commit Bot 2016-07-07 09:24:55 PDT
All reviewed patches have been landed.  Closing bug.