diff options
Diffstat (limited to 'src/daemon/connection.c')
-rw-r--r-- | src/daemon/connection.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/daemon/connection.c b/src/daemon/connection.c index 08dcdf7a..d87be33f 100644 --- a/src/daemon/connection.c +++ b/src/daemon/connection.c | |||
@@ -1935,6 +1935,7 @@ MHD_connection_handle_idle (struct MHD_Connection *connection) | |||
1935 | struct MHD_Daemon *daemon; | 1935 | struct MHD_Daemon *daemon; |
1936 | unsigned int timeout; | 1936 | unsigned int timeout; |
1937 | const char *end; | 1937 | const char *end; |
1938 | int rend; | ||
1938 | char *line; | 1939 | char *line; |
1939 | 1940 | ||
1940 | while (1) | 1941 | while (1) |
@@ -2205,6 +2206,10 @@ MHD_connection_handle_idle (struct MHD_Connection *connection) | |||
2205 | sizeof (val)); | 2206 | sizeof (val)); |
2206 | } | 2207 | } |
2207 | #endif | 2208 | #endif |
2209 | end = | ||
2210 | MHD_get_response_header (connection->response, | ||
2211 | MHD_HTTP_HEADER_CONNECTION); | ||
2212 | rend = ( (end != NULL) && (0 == strcasecmp (end, "close")) ); | ||
2208 | MHD_destroy_response (connection->response); | 2213 | MHD_destroy_response (connection->response); |
2209 | connection->response = NULL; | 2214 | connection->response = NULL; |
2210 | if (connection->daemon->notify_completed != NULL) | 2215 | if (connection->daemon->notify_completed != NULL) |
@@ -2229,7 +2234,7 @@ MHD_connection_handle_idle (struct MHD_Connection *connection) | |||
2229 | connection->write_buffer_size = 0; | 2234 | connection->write_buffer_size = 0; |
2230 | connection->write_buffer_send_offset = 0; | 2235 | connection->write_buffer_send_offset = 0; |
2231 | connection->write_buffer_append_offset = 0; | 2236 | connection->write_buffer_append_offset = 0; |
2232 | if ((end != NULL) && (0 == strcasecmp (end, "close"))) | 2237 | if ( (rend) || ((end != NULL) && (0 == strcasecmp (end, "close"))) ) |
2233 | { | 2238 | { |
2234 | connection->read_closed = MHD_YES; | 2239 | connection->read_closed = MHD_YES; |
2235 | connection->read_buffer_offset = 0; | 2240 | connection->read_buffer_offset = 0; |