Przeglądaj źródła

Removed extra "Upgrade" token in Connection reply header in tests and examples

MHD automatically adds "Upgrade" header, no need to add it for the
second time.
Evgeny Grin (Karlson2k) 3 lat temu
rodzic
commit
1c181be2ff

+ 0 - 3
doc/examples/websocket.c

@@ -382,9 +382,6 @@ access_handler (void *cls,
       /* upgrade the connection */
       response = MHD_create_response_for_upgrade (&upgrade_handler,
                                                   NULL);
-      MHD_add_response_header (response,
-                               MHD_HTTP_HEADER_CONNECTION,
-                               "Upgrade");
       MHD_add_response_header (response,
                                MHD_HTTP_HEADER_UPGRADE,
                                "websocket");

+ 0 - 3
src/microhttpd_ws/test_websocket_browser.c

@@ -494,9 +494,6 @@ access_handler (void *cls,
       /* upgrade the connection */
       response = MHD_create_response_for_upgrade (&upgrade_handler,
                                                   NULL);
-      MHD_add_response_header (response,
-                               MHD_HTTP_HEADER_CONNECTION,
-                               "Upgrade");
       MHD_add_response_header (response,
                                MHD_HTTP_HEADER_UPGRADE,
                                "websocket");