diff options
Diffstat (limited to 'src/daemon/connection.c')
-rw-r--r-- | src/daemon/connection.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/daemon/connection.c b/src/daemon/connection.c index d1a8121a..5de459ed 100644 --- a/src/daemon/connection.c +++ b/src/daemon/connection.c | |||
@@ -837,16 +837,18 @@ MHD_connection_handle_write(struct MHD_Connection * connection) { | |||
837 | connection->method = NULL; | 837 | connection->method = NULL; |
838 | free(connection->url); | 838 | free(connection->url); |
839 | connection->url = NULL; | 839 | connection->url = NULL; |
840 | free(connection->version); | ||
841 | connection->version = NULL; | ||
842 | free(connection->write_buffer); | 840 | free(connection->write_buffer); |
843 | connection->write_buffer = NULL; | 841 | connection->write_buffer = NULL; |
844 | connection->write_buffer_size = 0; | 842 | connection->write_buffer_size = 0; |
845 | if (connection->read_close != 0) { | 843 | if ( (connection->read_close != 0) || |
844 | (0 != strcasecmp("HTTP/1.1", | ||
845 | connection->version)) ) { | ||
846 | /* closed for reading => close for good! */ | 846 | /* closed for reading => close for good! */ |
847 | CLOSE(connection->socket_fd); | 847 | CLOSE(connection->socket_fd); |
848 | connection->socket_fd = -1; | 848 | connection->socket_fd = -1; |
849 | } | 849 | } |
850 | free(connection->version); | ||
851 | connection->version = NULL; | ||
850 | } | 852 | } |
851 | return MHD_YES; | 853 | return MHD_YES; |
852 | } | 854 | } |