nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: Update sha1 and base64 to use Bytes instead of String
[nit.git]
/
lib
/
websocket
/
websocket.nit
diff --git
a/lib/websocket/websocket.nit
b/lib/websocket/websocket.nit
index
c3fdaad
..
2a3c32f
100644
(file)
--- a/
lib/websocket/websocket.nit
+++ b/
lib/websocket/websocket.nit
@@
-114,7
+114,7
@@
class WebsocketConnection
resp_map["Connection:"] = "Upgrade"
var key = heads["Sec-WebSocket-Key"]
key += "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
resp_map["Connection:"] = "Upgrade"
var key = heads["Sec-WebSocket-Key"]
key += "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
- key = key.sha1.encode_base64
+ key = key.sha1.encode_base64.to_s
resp_map["Sec-WebSocket-Accept:"] = key
var resp = resp_map.join("\r\n", " ")
resp += "\r\n\r\n"
resp_map["Sec-WebSocket-Accept:"] = key
var resp = resp_map.join("\r\n", " ")
resp += "\r\n\r\n"