diff options
Diffstat (limited to 'src/microhttpd/response.c')
-rw-r--r-- | src/microhttpd/response.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c index d592007d..78e874d0 100644 --- a/src/microhttpd/response.c +++ b/src/microhttpd/response.c | |||
@@ -1953,6 +1953,15 @@ MHD_response_execute_upgrade_ (struct MHD_Response *response, | |||
1953 | MHD_STATICSTR_LEN_ ( \ | 1953 | MHD_STATICSTR_LEN_ ( \ |
1954 | MHD_HTTP_HEADER_UPGRADE))); | 1954 | MHD_HTTP_HEADER_UPGRADE))); |
1955 | 1955 | ||
1956 | if (! connection->sk_nonblck) | ||
1957 | { | ||
1958 | #ifdef HAVE_MESSAGES | ||
1959 | MHD_DLOG (daemon, | ||
1960 | _ ("Cannot execute \"upgrade\" as the socket is in " \ | ||
1961 | "the blocking mode.\n")); | ||
1962 | #endif | ||
1963 | return MHD_NO; | ||
1964 | } | ||
1956 | urh = MHD_calloc_ (1, sizeof (struct MHD_UpgradeResponseHandle)); | 1965 | urh = MHD_calloc_ (1, sizeof (struct MHD_UpgradeResponseHandle)); |
1957 | if (NULL == urh) | 1966 | if (NULL == urh) |
1958 | return MHD_NO; | 1967 | return MHD_NO; |