aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/response.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/response.c')
-rw-r--r--src/microhttpd/response.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index fc006da2..d3bf1ab7 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -1942,22 +1942,14 @@ MHD_response_execute_upgrade_ (struct MHD_Response *response,
1942 MHD_thread_ID_match_current_ (connection->pid) ); 1942 MHD_thread_ID_match_current_ (connection->pid) );
1943#endif /* MHD_USE_THREADS */ 1943#endif /* MHD_USE_THREADS */
1944 1944
1945 if (0 == (daemon->options & MHD_ALLOW_UPGRADE)) 1945 /* "Upgrade" responses accepted only if MHD_ALLOW_UPGRADE is enabled */
1946 return MHD_NO; 1946 mhd_assert (0 != (daemon->options & MHD_ALLOW_UPGRADE));
1947 1947 /* The header was checked when response queued */
1948 if (NULL == 1948 mhd_assert (NULL != \
1949 MHD_get_response_element_n_ (response, MHD_HEADER_KIND, 1949 MHD_get_response_element_n_ (response, MHD_HEADER_KIND,
1950 MHD_HTTP_HEADER_UPGRADE, 1950 MHD_HTTP_HEADER_UPGRADE,
1951 MHD_STATICSTR_LEN_ ( \ 1951 MHD_STATICSTR_LEN_ ( \
1952 MHD_HTTP_HEADER_UPGRADE))) 1952 MHD_HTTP_HEADER_UPGRADE)));
1953 {
1954#ifdef HAVE_MESSAGES
1955 MHD_DLOG (daemon,
1956 _ ("Invalid response for upgrade: " \
1957 "application failed to set the 'Upgrade' header!\n"));
1958#endif
1959 return MHD_NO;
1960 }
1961 1953
1962 urh = MHD_calloc_ (1, sizeof (struct MHD_UpgradeResponseHandle)); 1954 urh = MHD_calloc_ (1, sizeof (struct MHD_UpgradeResponseHandle));
1963 if (NULL == urh) 1955 if (NULL == urh)