Roxen.git/
server/
modules/
misc/
websocket.pike
Branch:
Tag:
Non-build tags
All tags
No tags
2018-10-03
2018-10-03 10:01:46 by Henrik Grubbström (Grubba) <grubba@grubba.org>
98adab7c62e1f9a612741fd14b868b7c2b2bd52e (
13
lines) (+
6
/-
7
)
[
Show
|
Annotate
]
Branch:
agehall/websocket
WebSocket: Added constant Roxen.WEBSOCKET_OPEN_METHOD.
62:
// Operation: //
-
// * For syntactically valid WebSocket requests, the
-
//
method
field in the RequestID is set to
"WebSocketOpen"
,
+
// * For syntactically valid WebSocket requests, the
method
+
// field in the RequestID is set to
Roxen.WEBSOCKET_OPEN_METHOD
,
// the default error_code set to HTTP_BAD and zero returned. // // * For requests that don't seem to be WebSocket requests
77:
// error status is returned. // // This means that modules implementing support for WebSockets
-
// need to check for the method
"WebSocketOpen"
, and then
-
//
return Roxen.upgrade_to_websocket() if appropriate.
+
// need to check for the method
Roxen.WEBSOCKET_OPEN_METHOD
,
+
//
and then return Roxen.upgrade_to_websocket() if appropriate.
mapping(string:mixed)|int(-1..0) first_try(RequestID id) {
143:
TRACE_LEAVE("Yes.");
-
// NB: The mixed case in the method ensures that it can't be
-
// set directly from the http request.
-
id->method =
"WebSocketOpen"
;
+
id->method =
Roxen.WEBSOCKET_OPEN_METHOD
;
id->misc->error_code = Protocols.HTTP.HTTP_BAD; // Continue request processing. return 0; }