aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/daemon/connection.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/daemon/connection.c b/src/daemon/connection.c
index efa27a46..5a4b6f71 100644
--- a/src/daemon/connection.c
+++ b/src/daemon/connection.c
@@ -579,6 +579,7 @@ build_header_response (struct MHD_Connection *connection)
579 enum MHD_ValueKind kind; 579 enum MHD_ValueKind kind;
580 const char *reason_phrase; 580 const char *reason_phrase;
581 581
582 EXTRA_CHECK (NULL != connection->version);
582 if (0 == strlen(connection->version)) 583 if (0 == strlen(connection->version))
583 { 584 {
584 data = MHD_pool_allocate (connection->pool, 0, MHD_YES); 585 data = MHD_pool_allocate (connection->pool, 0, MHD_YES);
@@ -673,7 +674,12 @@ transmit_error_response (struct MHD_Connection *connection,
673{ 674{
674 struct MHD_Response *response; 675 struct MHD_Response *response;
675 676
676 /* die, header far too long to be reasonable */ 677 if (connection->version == NULL)
678 {
679 /* we were unable to process the full header line, so we don't
680 really know what version the client speaks; assume 1.0 */
681 connection->version = MHD_HTTP_VERSION_1_0;
682 }
677 connection->state = MHD_CONNECTION_FOOTERS_RECEIVED; 683 connection->state = MHD_CONNECTION_FOOTERS_RECEIVED;
678 connection->read_closed = MHD_YES; 684 connection->read_closed = MHD_YES;
679#if HAVE_MESSAGES 685#if HAVE_MESSAGES