Handbook
Glossary
add-websocket-upgrade-headers ( request -- request )
Vocabulary
http
.
websockets
Inputs
request
an
object
Outputs
request
an
object
Definition
USING:
accessors
assocs
http
kernel
;
IN:
http.websockets
:
add-websocket-upgrade-headers
( request -- request )
"connection"
over
header>>
delete-at
websocket-version
"Sec-WebSocket-Version"
set-header
random-websocket-key
"Sec-WebSocket-Key"
set-header
"Upgrade"
"Connection"
set-header
"websocket"
"Upgrade"
set-header
"no-cache"
"Pragma"
set-header
"no-cache"
"Cache-Control"
set-header
"permessage-deflate; client_max_window_bits"
"Sec-WebSocket-Extensions"
set-header
dup
url>>
host>>
"Host"
set-header
dup
url>>
[
"ws"
=
"http"
"https"
?
]
change-protocol
drop
;