diff options
Diffstat (limited to 'src/microhttpd/connection.c')
-rw-r--r-- | src/microhttpd/connection.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index cfa4a806..e91b2d87 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -1091,7 +1091,7 @@ build_header_response (struct MHD_Connection *connection) | |||
1091 | client_requested_close = NULL; | 1091 | client_requested_close = NULL; |
1092 | 1092 | ||
1093 | /* now analyze chunked encoding situation */ | 1093 | /* now analyze chunked encoding situation */ |
1094 | connection->have_chunked_upload = MHD_NO; | 1094 | connection->have_chunked_upload = false; |
1095 | 1095 | ||
1096 | if ( (MHD_SIZE_UNKNOWN == connection->response->total_size) && | 1096 | if ( (MHD_SIZE_UNKNOWN == connection->response->total_size) && |
1097 | (NULL == response_has_close) && | 1097 | (NULL == response_has_close) && |
@@ -1111,7 +1111,7 @@ build_header_response (struct MHD_Connection *connection) | |||
1111 | if (NULL == have_encoding) | 1111 | if (NULL == have_encoding) |
1112 | { | 1112 | { |
1113 | must_add_chunked_encoding = MHD_YES; | 1113 | must_add_chunked_encoding = MHD_YES; |
1114 | connection->have_chunked_upload = MHD_YES; | 1114 | connection->have_chunked_upload = true; |
1115 | } | 1115 | } |
1116 | else if (MHD_str_equal_caseless_ (have_encoding, | 1116 | else if (MHD_str_equal_caseless_ (have_encoding, |
1117 | "identity")) | 1117 | "identity")) |
@@ -1121,7 +1121,7 @@ build_header_response (struct MHD_Connection *connection) | |||
1121 | } | 1121 | } |
1122 | else | 1122 | else |
1123 | { | 1123 | { |
1124 | connection->have_chunked_upload = MHD_YES; | 1124 | connection->have_chunked_upload = true; |
1125 | } | 1125 | } |
1126 | } | 1126 | } |
1127 | else | 1127 | else |
@@ -1858,7 +1858,7 @@ process_request_body (struct MHD_Connection *connection) | |||
1858 | do | 1858 | do |
1859 | { | 1859 | { |
1860 | instant_retry = MHD_NO; | 1860 | instant_retry = MHD_NO; |
1861 | if ( (MHD_YES == connection->have_chunked_upload) && | 1861 | if ( (connection->have_chunked_upload) && |
1862 | (MHD_SIZE_UNKNOWN == connection->remaining_upload_size) ) | 1862 | (MHD_SIZE_UNKNOWN == connection->remaining_upload_size) ) |
1863 | { | 1863 | { |
1864 | if ( (connection->current_chunk_offset == connection->current_chunk_size) && | 1864 | if ( (connection->current_chunk_offset == connection->current_chunk_size) && |
@@ -2015,7 +2015,7 @@ process_request_body (struct MHD_Connection *connection) | |||
2015 | #endif | 2015 | #endif |
2016 | } | 2016 | } |
2017 | used -= processed; | 2017 | used -= processed; |
2018 | if (MHD_YES == connection->have_chunked_upload) | 2018 | if (connection->have_chunked_upload) |
2019 | connection->current_chunk_offset += used; | 2019 | connection->current_chunk_offset += used; |
2020 | /* dh left "processed" bytes in buffer for next time... */ | 2020 | /* dh left "processed" bytes in buffer for next time... */ |
2021 | buffer_head += used; | 2021 | buffer_head += used; |
@@ -2335,7 +2335,7 @@ parse_connection_headers (struct MHD_Connection *connection) | |||
2335 | connection->remaining_upload_size = MHD_SIZE_UNKNOWN; | 2335 | connection->remaining_upload_size = MHD_SIZE_UNKNOWN; |
2336 | if (MHD_str_equal_caseless_(enc, | 2336 | if (MHD_str_equal_caseless_(enc, |
2337 | "chunked")) | 2337 | "chunked")) |
2338 | connection->have_chunked_upload = MHD_YES; | 2338 | connection->have_chunked_upload = true; |
2339 | } | 2339 | } |
2340 | else | 2340 | else |
2341 | { | 2341 | { |
@@ -2904,8 +2904,8 @@ MHD_connection_handle_idle (struct MHD_Connection *connection) | |||
2904 | (0 == connection->read_buffer_offset) && | 2904 | (0 == connection->read_buffer_offset) && |
2905 | (connection->read_closed) ) ) | 2905 | (connection->read_closed) ) ) |
2906 | { | 2906 | { |
2907 | if ((MHD_YES == connection->have_chunked_upload) && | 2907 | if ( (connection->have_chunked_upload) && |
2908 | (! connection->read_closed)) | 2908 | (! connection->read_closed) ) |
2909 | connection->state = MHD_CONNECTION_BODY_RECEIVED; | 2909 | connection->state = MHD_CONNECTION_BODY_RECEIVED; |
2910 | else | 2910 | else |
2911 | connection->state = MHD_CONNECTION_FOOTERS_RECEIVED; | 2911 | connection->state = MHD_CONNECTION_FOOTERS_RECEIVED; |
@@ -3098,7 +3098,7 @@ MHD_connection_handle_idle (struct MHD_Connection *connection) | |||
3098 | _("Closing connection (failed to create response header)\n")); | 3098 | _("Closing connection (failed to create response header)\n")); |
3099 | continue; | 3099 | continue; |
3100 | } | 3100 | } |
3101 | if ( (MHD_NO == connection->have_chunked_upload) || | 3101 | if ( (! connection->have_chunked_upload) || |
3102 | (connection->write_buffer_send_offset == | 3102 | (connection->write_buffer_send_offset == |
3103 | connection->write_buffer_append_offset) ) | 3103 | connection->write_buffer_append_offset) ) |
3104 | connection->state = MHD_CONNECTION_FOOTERS_SENT; | 3104 | connection->state = MHD_CONNECTION_FOOTERS_SENT; |
@@ -3190,7 +3190,7 @@ MHD_connection_handle_idle (struct MHD_Connection *connection) | |||
3190 | connection->headers_received = NULL; | 3190 | connection->headers_received = NULL; |
3191 | connection->headers_received_tail = NULL; | 3191 | connection->headers_received_tail = NULL; |
3192 | connection->response_write_position = 0; | 3192 | connection->response_write_position = 0; |
3193 | connection->have_chunked_upload = MHD_NO; | 3193 | connection->have_chunked_upload = false; |
3194 | connection->method = NULL; | 3194 | connection->method = NULL; |
3195 | connection->url = NULL; | 3195 | connection->url = NULL; |
3196 | connection->write_buffer = NULL; | 3196 | connection->write_buffer = NULL; |