[Webkit-unassigned] [Bug 46151] New: XMLHttpRequest: setRequestHeader() does not throw SYNTAX_ERR exception if the header field name is empty

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 20 18:03:37 PDT 2010


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

           Summary: XMLHttpRequest: setRequestHeader() does not throw
                    SYNTAX_ERR exception if the header field name is empty
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore JavaScript
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jianli at chromium.org
                CC: ap at webkit.org, fishd at chromium.org,
                    dimich at chromium.org, levin at chromium.org,
                    jianli at chromium.org


XMLHttpRequest: setRequestHeader() does not throw SYNTAX_ERR exception if the header field name is empty

Per the XHR spec:
  client . setRequestHeader(header, value)
    Throws a SYNTAX_ERR exception if header is not a valid HTTP header field name or if value is not a valid HTTP header field value.

Test: http://tc.labs.opera.com/apis/XMLHttpRequest/setrequestheader-bogus-header.htm

Note that this test is not 100% correct because it checks against INVALID_STATE_ERR instead of SYNTAX_ERR. However, after fixing this, we do have one bug with not throwing SYNTAX_ERR exception if the header field name is empty

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list