improve some websocket error messages + add a utility function with unittest to parse status line and stop using scanf which triggers warnings on Windows
This commit is contained in:
@ -681,8 +681,12 @@ namespace ix
|
||||
reason = WebSocketCloseConstants::kInvalidFramePayloadDataMessage;
|
||||
}
|
||||
|
||||
//
|
||||
// Validate close codes. Autobahn 7.9.*
|
||||
// 1014, 1015 are debattable. The firefox MSDN has a description for them
|
||||
// 1014, 1015 are debattable. The firefox MSDN has a description for them.
|
||||
// Full list of status code and status range is defined in the dedicated
|
||||
// RFC section at https://tools.ietf.org/html/rfc6455#page-45
|
||||
//
|
||||
if (code < 1000 || code == 1004 || code == 1006 ||
|
||||
(code > 1013 && code < 3000))
|
||||
{
|
||||
|
Reference in New Issue
Block a user