Bug 753105 - Change Websocket "internal error" code to 2011. r=mcmanus

This commit is contained in:
Jason Duell 2012-05-17 10:59:26 -07:00
Родитель dc8e1646bb
Коммит fe4f933442
1 изменённых файлов: 8 добавлений и 5 удалений

Просмотреть файл

@ -48,7 +48,7 @@ interface nsIInputStream;
/**
* You probably want nsI{Moz}WebSocket.idl
*/
[uuid(ace34548-6dde-4570-b0b4-451aa6a877e0)]
[uuid(0683E9A4-994D-11E1-9478-1E356188709B)]
interface nsIWebSocketChannel : nsISupports
{
/**
@ -134,10 +134,13 @@ interface nsIWebSocketChannel : nsISupports
const unsigned short CLOSE_POLICY_VIOLATION = 1008;
const unsigned short CLOSE_TOO_LARGE = 1009;
const unsigned short CLOSE_EXTENSION_MISSING = 1010;
// Websocket spec doesn't have equivalent of HTTP 500 code for internal
// errors: just use CLOSE_GOING_AWAY for now
const unsigned short CLOSE_INTERNAL_ERROR = CLOSE_GOING_AWAY;
// Initially used just for server-side internal errors: adopted later for
// client-side errors too (not clear if will make into spec: see
// http://www.ietf.org/mail-archive/web/hybi/current/msg09372.html
const unsigned short CLOSE_INTERNAL_ERROR = 1011;
// MUST NOT be set as a status code in Close control frame by an endpoint:
// To be used if TLS handshake failed (ex: server certificate unverifiable)
const unsigned short CLOSE_TLS_FAILED = 1015;
/**
* Use to send text message down the connection to WebSocket peer.