[Bug 21147] New: WebSocket API could provide a method to get the HTTP response code when it's not 101

https://www.w3.org/Bugs/Public/show_bug.cgi?id=21147

            Bug ID: 21147
           Summary: WebSocket API could provide a method to get the HTTP
                    response code when it's not 101
    Classification: Unclassified
           Product: HTML WG
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: HTML5 spec
          Assignee: dave.null@w3.org
          Reporter: ibc@aliax.net
        QA Contact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-admin@w3.org,
                    public-html-wg-issue-tracking@w3.org

If the WebSocket connection fails due to a non 101 HTTP response code from the
server, there is no way to know the exact HTTP code. This could be useful.

For example:

<pre>
var conn = new WebSocket("ws://non-a-websocket-server:80");

// Let's assume HTTP 400 is replied.

// This would print "400":
console.log(conn.httpStatusCode);
</pre>

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 27 February 2013 16:40:46 UTC