diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-04-27 23:22:31 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-04-27 23:22:31 +0200 |
commit | 67c79a9cd1174432988bcb315317f9dace8e131b (patch) | |
tree | 6bb96d6d17b117b7e3ba4a533822f033db79d71d | |
parent | 26b082a6b45e90fcaa692f7f1a68670e198a7d9b (diff) | |
download | libmicrohttpd-67c79a9cd1174432988bcb315317f9dace8e131b.tar.gz libmicrohttpd-67c79a9cd1174432988bcb315317f9dace8e131b.zip |
fix typos
-rw-r--r-- | src/microhttpd_ws/mhd_websocket.c | 8 | ||||
-rw-r--r-- | src/microhttpd_ws/test_websocket.c | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/microhttpd_ws/mhd_websocket.c b/src/microhttpd_ws/mhd_websocket.c index 0e977973..12b46eef 100644 --- a/src/microhttpd_ws/mhd_websocket.c +++ b/src/microhttpd_ws/mhd_websocket.c | |||
@@ -30,11 +30,11 @@ | |||
30 | 30 | ||
31 | struct MHD_WebSocketStream | 31 | struct MHD_WebSocketStream |
32 | { | 32 | { |
33 | /* The function pointer to malloc for payload (can be used to use different memory managment) */ | 33 | /* The function pointer to malloc for payload (can be used to use different memory management) */ |
34 | MHD_WebSocketMallocCallback malloc; | 34 | MHD_WebSocketMallocCallback malloc; |
35 | /* The function pointer to realloc for payload (can be used to use different memory managment) */ | 35 | /* The function pointer to realloc for payload (can be used to use different memory management) */ |
36 | MHD_WebSocketReallocCallback realloc; | 36 | MHD_WebSocketReallocCallback realloc; |
37 | /* The function pointer to free for payload (can be used to use different memory managment) */ | 37 | /* The function pointer to free for payload (can be used to use different memory management) */ |
38 | MHD_WebSocketFreeCallback free; | 38 | MHD_WebSocketFreeCallback free; |
39 | /* The flags specified upon initialization. It may alter the behavior of decoding/encoding */ | 39 | /* The flags specified upon initialization. It may alter the behavior of decoding/encoding */ |
40 | int flags; | 40 | int flags; |
@@ -400,7 +400,7 @@ MHD_websocket_decode (struct MHD_WebSocketStream*ws, | |||
400 | if (0 != (opcode & 0x70)) | 400 | if (0 != (opcode & 0x70)) |
401 | { | 401 | { |
402 | /* RFC 6455 5.2 RSV1-3: If a reserved flag is set */ | 402 | /* RFC 6455 5.2 RSV1-3: If a reserved flag is set */ |
403 | /* (while it isn't specified by an extension) the communcation must fail. */ | 403 | /* (while it isn't specified by an extension) the communication must fail. */ |
404 | ws->validity = MHD_WEBSOCKET_VALIDITY_INVALID; | 404 | ws->validity = MHD_WEBSOCKET_VALIDITY_INVALID; |
405 | if (0 != (ws->flags | 405 | if (0 != (ws->flags |
406 | & MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR)) | 406 | & MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR)) |
diff --git a/src/microhttpd_ws/test_websocket.c b/src/microhttpd_ws/test_websocket.c index 7e0cf4d6..0034eb4c 100644 --- a/src/microhttpd_ws/test_websocket.c +++ b/src/microhttpd_ws/test_websocket.c | |||
@@ -1055,7 +1055,7 @@ test_decodes () | |||
1055 | MHD_WEBSOCKET_STATUS_BINARY_LAST_FRAGMENT, | 1055 | MHD_WEBSOCKET_STATUS_BINARY_LAST_FRAGMENT, |
1056 | MHD_WEBSOCKET_VALIDITY_VALID, | 1056 | MHD_WEBSOCKET_VALIDITY_VALID, |
1057 | 12); | 1057 | 12); |
1058 | /* Regular test: Fragmented binary frame wit payload */ | 1058 | /* Regular test: Fragmented binary frame with payload */ |
1059 | failed += test_decode_single (__LINE__, | 1059 | failed += test_decode_single (__LINE__, |
1060 | MHD_WEBSOCKET_FLAG_SERVER | 1060 | MHD_WEBSOCKET_FLAG_SERVER |
1061 | | MHD_WEBSOCKET_FLAG_NO_FRAGMENTS, | 1061 | | MHD_WEBSOCKET_FLAG_NO_FRAGMENTS, |
@@ -2724,7 +2724,7 @@ test_decodes () | |||
2724 | MHD_WEBSOCKET_STATUS_UTF8_ENCODING_ERROR, | 2724 | MHD_WEBSOCKET_STATUS_UTF8_ENCODING_ERROR, |
2725 | MHD_WEBSOCKET_VALIDITY_INVALID, | 2725 | MHD_WEBSOCKET_VALIDITY_INVALID, |
2726 | 7); | 2726 | 7); |
2727 | /* Edge test (success): The maxium allowed UTF-8 character */ | 2727 | /* Edge test (success): The maximum allowed UTF-8 character */ |
2728 | failed += test_decode_single (__LINE__, | 2728 | failed += test_decode_single (__LINE__, |
2729 | MHD_WEBSOCKET_FLAG_SERVER | 2729 | MHD_WEBSOCKET_FLAG_SERVER |
2730 | | MHD_WEBSOCKET_FLAG_NO_FRAGMENTS, | 2730 | | MHD_WEBSOCKET_FLAG_NO_FRAGMENTS, |
@@ -2738,7 +2738,7 @@ test_decodes () | |||
2738 | MHD_WEBSOCKET_STATUS_TEXT_FRAME, | 2738 | MHD_WEBSOCKET_STATUS_TEXT_FRAME, |
2739 | MHD_WEBSOCKET_VALIDITY_VALID, | 2739 | MHD_WEBSOCKET_VALIDITY_VALID, |
2740 | 16); | 2740 | 16); |
2741 | /* Edge test (fail): The maxium allowed UTF-8 character + 1 */ | 2741 | /* Edge test (fail): The maximum allowed UTF-8 character + 1 */ |
2742 | failed += test_decode_single (__LINE__, | 2742 | failed += test_decode_single (__LINE__, |
2743 | MHD_WEBSOCKET_FLAG_SERVER | 2743 | MHD_WEBSOCKET_FLAG_SERVER |
2744 | | MHD_WEBSOCKET_FLAG_NO_FRAGMENTS, | 2744 | | MHD_WEBSOCKET_FLAG_NO_FRAGMENTS, |