W3C home > Mailing lists > Public > public-html-admin@w3.org > February 2013

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

From: <bugzilla@jessica.w3.org>
Date: Wed, 27 Feb 2013 16:40:45 +0000
To: public-html-admin@w3.org
Message-ID: <bug-21147-2495@http.www.w3.org/Bugs/Public/>
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 on the CC list for the bug.
Received on Wednesday, 27 February 2013 16:40:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 February 2013 16:40:48 GMT