diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2014-06-21 18:36:35 -0700 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2014-06-21 18:36:35 -0700 |
commit | 7b33bd13b459b55023406dc8d33eb9b3e5e0a018 (patch) | |
tree | 08333df9b53917aed986bf12c120b2df89440949 /src | |
parent | f35b19adcb83d5ff4114c2c56ac4ecdc91e6ccd6 (diff) |
Minor fixes to BWebSocket.cc
Diffstat (limited to 'src')
-rw-r--r-- | src/BWebSocket.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/BWebSocket.cc b/src/BWebSocket.cc index 7cd97cd..339ac3a 100644 --- a/src/BWebSocket.cc +++ b/src/BWebSocket.cc @@ -215,7 +215,7 @@ void Balau::WebSocketWorker::Do() { *remainingBytesP = *payloadLenP; if (*totalLenP >= MAX_WEBSOCKET_LIMIT) goto error; - *payloadP = (uint8_t *)realloc(*payloadP, *totalLenP + (*opcodeP == OPCODE_TEXT ? 1 : 0)); + *payloadP = (uint8_t *) realloc(*payloadP, *totalLenP + (*opcodeP == OPCODE_TEXT ? 1 : 0)); case READ_PL: while (*remainingBytesP) { int r = m_socket->read(*payloadP + *totalLenP - *remainingBytesP, *remainingBytesP); @@ -325,8 +325,8 @@ bool Balau::WebSocketServerBase::Do(HttpServer * server, Http::Request & req, Ht { HttpServer::Response response(server, req, out); - String & key = req.headers["Sec-WebSocket-Key"]; - uint8_t * toHash = (uint8_t *)alloca(key.strlen() + magic.strlen()); + const String & key = req.headers["Sec-WebSocket-Key"]; + uint8_t * toHash = (uint8_t *) alloca(key.strlen() + magic.strlen()); memcpy(toHash, key.to_charp(), key.strlen()); memcpy(toHash + key.strlen(), magic.to_charp(), magic.strlen()); |