Skip to content

Commit 0d43460

Browse files
uNetworkingABAlex Hultman
authored andcommitted
Hook up ERR_INVALID_CLOSE_PAYLOAD
1 parent 01058d9 commit 0d43460

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/WebSocketProtocol.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ static inline CloseFrame parseClosePayload(char *src, size_t length) {
170170
if (cf.code < 1000 || cf.code > 4999 || (cf.code > 1011 && cf.code < 4000) ||
171171
(cf.code >= 1004 && cf.code <= 1006) || !isValidUtf8((unsigned char *) cf.message, cf.length)) {
172172
/* Even though we got a WebSocket close frame, it in itself is abnormal */
173-
return {1006, nullptr, 0};
173+
return {1006, (char *) ERR_INVALID_CLOSE_PAYLOAD.data(), ERR_INVALID_CLOSE_PAYLOAD.length()};
174174
}
175175
}
176176
return cf;

0 commit comments

Comments
 (0)