[Webkit-unassigned] [Bug 147445] Validation in isValidHTTPHeaderValue is too sensitive.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 5 10:50:37 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=147445

--- Comment #18 from youenn fablet <youennf at gmail.com> ---
(In reply to comment #17)
> > If we split the sub-issues, that would give:
> > 1. Add support for trimming whitespaces in XHR.setRequestHeader
> 
> I'm not sure if that would be an observable change in behavior given the
> below...
> 
> > 2. Ensure XHR can set a header with an empty value
> 
> I think that this should raise an exception.

Why should it be?

It is a valid value per the HTTP spec.
The semantics of that value is defined for some standardized headers, probably for application specific headers as well.

Firefox, Chrome and IE are not throwing.

> > 3. Ensure XHR can set "Content-Type" with an empty value
> 
> Ditto.

This case is really less appealing.
But again, what is the benefit of throwing here?

The same throw/notthrow rule should apply to all settable headers.
Since there are defaulting rules defined for this header, the processing of a Content-Type empty header value might be defined differently though if that proves to be useful.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150805/392787b3/attachment-0001.html>


More information about the webkit-unassigned mailing list