aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/connection.c')
-rw-r--r--src/microhttpd/connection.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 93c3ebfb..0280bdab 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -5229,6 +5229,27 @@ MHD_queue_response (struct MHD_Connection *connection,
5229 } 5229 }
5230 } 5230 }
5231#endif /* UPGRADE_SUPPORT */ 5231#endif /* UPGRADE_SUPPORT */
5232 if (MHD_HTTP_SWITCHING_PROTOCOLS == status_code)
5233 {
5234#ifdef UPGRADE_SUPPORT
5235 if (NULL == response->upgrade_handler)
5236 {
5237#ifdef HAVE_MESSAGES
5238 MHD_DLOG (daemon,
5239 _ ("Application used status code 101 \"Switching Protocols\" " \
5240 "with non-'upgrade' response!\n"));
5241#endif /* HAVE_MESSAGES */
5242 return MHD_NO;
5243 }
5244#else /* ! UPGRADE_SUPPORT */
5245#ifdef HAVE_MESSAGES
5246 MHD_DLOG (daemon,
5247 _ ("Application used status code 101 \"Switching Protocols\", " \
5248 "but this MHD was built without \"Upgrade\" support!\n"));
5249#endif /* HAVE_MESSAGES */
5250 return MHD_NO;
5251#endif /* ! UPGRADE_SUPPORT */
5252 }
5232 if ( (100 > status_code) || 5253 if ( (100 > status_code) ||
5233 (999 < status_code) ) 5254 (999 < status_code) )
5234 { 5255 {