diff options
author | Alexander Irion <alexander_irion@mentor.com> | 2022-06-15 12:34:49 +0200 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-06-15 15:28:07 +0300 |
commit | 3526ff83027997ccf360b4729dbfef9aa97f236d (patch) | |
tree | 374916e4ac7b82a70462b0aac058433b0cb35e6f | |
parent | ad61ffabeb012f342518deb1f711812a68e64cfc (diff) | |
download | libmicrohttpd-3526ff83027997ccf360b4729dbfef9aa97f236d.tar.gz libmicrohttpd-3526ff83027997ccf360b4729dbfef9aa97f236d.zip |
Remove double adding of MHD_HTTP_HEADER_CONNECTION response header
MHD_create_response_for_upgrade() already adds the MHD_HTTP_HEADER_CONNECTION response header, so
the additional MHD_add_response_header is wrong.
In our application it caused, that on a Apple iPad, the websocket was immediately closed by the
browser(Safari, Chrome, Opera) after the protocol upgrade. Browsers on Linux, Android did not had this issue.
Signed-off-by: Alexander Irion <alexander_irion@mentor.com>
-rw-r--r-- | src/examples/websocket_chatserver_example.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/examples/websocket_chatserver_example.c b/src/examples/websocket_chatserver_example.c index cc3005a2..cd5940db 100644 --- a/src/examples/websocket_chatserver_example.c +++ b/src/examples/websocket_chatserver_example.c | |||
@@ -2242,9 +2242,6 @@ access_handler (void *cls, | |||
2242 | * See also: https://tools.ietf.org/html/rfc6455#section-4.2.2 | 2242 | * See also: https://tools.ietf.org/html/rfc6455#section-4.2.2 |
2243 | */ | 2243 | */ |
2244 | MHD_add_response_header (response, | 2244 | MHD_add_response_header (response, |
2245 | MHD_HTTP_HEADER_CONNECTION, | ||
2246 | "Upgrade"); | ||
2247 | MHD_add_response_header (response, | ||
2248 | MHD_HTTP_HEADER_UPGRADE, | 2245 | MHD_HTTP_HEADER_UPGRADE, |
2249 | "websocket"); | 2246 | "websocket"); |
2250 | MHD_add_response_header (response, | 2247 | MHD_add_response_header (response, |