diff --git a/src/modules/httpd.reb b/src/modules/httpd.reb index c5a5011dda..f9cf2ffa69 100644 --- a/src/modules/httpd.reb +++ b/src/modules/httpd.reb @@ -423,8 +423,6 @@ sys/make-scheme [ ctx/out/header/Upgrade: "websocket" ctx/out/header/Connection: "Upgrade" ctx/out/header/Sec-WebSocket-Accept: enbase checksum join key "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" 'sha1 64 - ;? ctx/out/header - ;ctx/out/content: "" ] ] ] diff --git a/src/tests/test-httpd.r3 b/src/tests/test-httpd.r3 index ca7d6b4a6b..4b374380be 100644 --- a/src/tests/test-httpd.r3 +++ b/src/tests/test-httpd.r3 @@ -16,7 +16,7 @@ Rebol [ secure [%../modules/ allow] do %../modules/httpd.reb -system/options/log/httpd: 4 ; for verbose output +system/options/log/httpd: 1 ; for verbose output system/options/quiet: false ; make sure that there is the directory for logs @@ -32,18 +32,6 @@ humans.txt: { \____________/~~~> http://github.com/oldes/ } -WS-handshake: func[ctx /local key][ - if all [ - "websocket" = select ctx/inp/header 'Upgrade - key: select ctx/inp/header 'Sec-WebSocket-Key - ][ - ctx/out/status: 101 - ctx/out/header/Upgrade: "websocket" - ctx/out/header/Connection: "Upgrade" - ctx/out/header/Sec-WebSocket-Accept: enbase checksum join key "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" 'sha1 64 - ] -] - http-server/config/actor 8081 [ ;- Main server configuration @@ -131,7 +119,7 @@ http-server/config/actor 8081 [ %/echo [ ;@@ Consider checking the ctx/out/header/Origin value ;@@ before accepting websocket connection upgrade! - WS-handshake ctx + system/schemes/httpd/actor/WS-handshake ctx ] ] ]