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.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 98e58123..94ed459d 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -615,8 +615,7 @@ MHD_connection_mark_closed_ (struct MHD_Connection *connection)
615 * and do not shutdown TCP socket. This give more 615 * and do not shutdown TCP socket. This give more
616 * chances to send TLS closure data to remote side. 616 * chances to send TLS closure data to remote side.
617 * Closure of TLS layer will be interpreted by 617 * Closure of TLS layer will be interpreted by
618 * remote side as end of transmission. */ 618 * remote side as end of transmission. */if (0 != (daemon->options & MHD_USE_TLS))
619 if (0 != (daemon->options & MHD_USE_TLS))
620 { 619 {
621 if (! MHD_tls_connection_shutdown (connection)) 620 if (! MHD_tls_connection_shutdown (connection))
622 shutdown (connection->socket_fd, 621 shutdown (connection->socket_fd,
@@ -730,8 +729,7 @@ MHD_connection_finish_forward_ (struct MHD_Connection *connection)
730 * used with MHD_UPGRADE_ACTION_CLOSE. They will be 729 * used with MHD_UPGRADE_ACTION_CLOSE. They will be
731 * closed by MHD_cleanup_upgraded_connection_() during 730 * closed by MHD_cleanup_upgraded_connection_() during
732 * connection's final cleanup. 731 * connection's final cleanup.
733 */ 732 */}
734}
735 733
736 734
737#endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT*/ 735#endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT*/
@@ -1144,8 +1142,7 @@ try_grow_read_buffer (struct MHD_Connection *connection,
1144 the right position in the pool, say because someone called 1142 the right position in the pool, say because someone called
1145 MHD_pool_allocate() without 'from_end' set to 'true'? Anyway, 1143 MHD_pool_allocate() without 'from_end' set to 'true'? Anyway,
1146 should be investigated! (Ideally provide all data from 1144 should be investigated! (Ideally provide all data from
1147 *pool and connection->read_buffer and new_size for debugging). */ 1145 *pool and connection->read_buffer and new_size for debugging). */mhd_assert (0);
1148 mhd_assert (0);
1149 return false; 1146 return false;
1150 } 1147 }
1151 connection->read_buffer = rb; 1148 connection->read_buffer = rb;
@@ -1370,8 +1367,7 @@ build_header_response (struct MHD_Connection *connection)
1370 1367
1371 Note that the change from 'SHOULD NOT' to 'MUST NOT' is 1368 Note that the change from 'SHOULD NOT' to 'MUST NOT' is
1372 a recent development of the HTTP 1.1 specification. 1369 a recent development of the HTTP 1.1 specification.
1373 */ 1370 */content_length_len
1374 content_length_len
1375 = MHD_snprintf_ (content_length_buf, 1371 = MHD_snprintf_ (content_length_buf,
1376 sizeof (content_length_buf), 1372 sizeof (content_length_buf),
1377 MHD_HTTP_HEADER_CONTENT_LENGTH ": " 1373 MHD_HTTP_HEADER_CONTENT_LENGTH ": "
@@ -1704,8 +1700,7 @@ MHD_connection_update_event_loop_info (struct MHD_Connection *connection)
1704 or if we do nothing, we would just timeout 1700 or if we do nothing, we would just timeout
1705 on the connection (if a timeout is even 1701 on the connection (if a timeout is even
1706 set!). 1702 set!).
1707 Solution: we kill the connection with an error */ 1703 Solution: we kill the connection with an error */transmit_error_response (connection,
1708 transmit_error_response (connection,
1709 MHD_HTTP_INTERNAL_SERVER_ERROR, 1704 MHD_HTTP_INTERNAL_SERVER_ERROR,
1710 INTERNAL_ERROR); 1705 INTERNAL_ERROR);
1711 continue; 1706 continue;
@@ -2479,8 +2474,7 @@ process_header_line (struct MHD_Connection *connection,
2479 header at the beginning of the while 2474 header at the beginning of the while
2480 loop since we need to be able to inspect 2475 loop since we need to be able to inspect
2481 the *next* header line (in case it starts 2476 the *next* header line (in case it starts
2482 with a space...) */ 2477 with a space...) */connection->last = line;
2483 connection->last = line;
2484 connection->colon = colon; 2478 connection->colon = colon;
2485 return MHD_YES; 2479 return MHD_YES;
2486} 2480}
@@ -2527,8 +2521,7 @@ process_broken_line (struct MHD_Connection *connection,
2527 adjacency); also, in the case where these are not adjacent 2521 adjacency); also, in the case where these are not adjacent
2528 (not sure how it can happen!), we would want to allocate from 2522 (not sure how it can happen!), we would want to allocate from
2529 the end of the pool, so as to not destroy the read-buffer's 2523 the end of the pool, so as to not destroy the read-buffer's
2530 ability to grow nicely. */ 2524 ability to grow nicely. */last = MHD_pool_reallocate (connection->pool,
2531 last = MHD_pool_reallocate (connection->pool,
2532 last, 2525 last,
2533 last_len + 1, 2526 last_len + 1,
2534 last_len + tmp_len + 1); 2527 last_len + tmp_len + 1);
@@ -3078,7 +3071,7 @@ MHD_connection_handle_write (struct MHD_Connection *connection)
3078 [connection->write_buffer_send_offset], 3071 [connection->write_buffer_send_offset],
3079 connection->write_buffer_append_offset 3072 connection->write_buffer_append_offset
3080 - connection->write_buffer_send_offset, 3073 - connection->write_buffer_send_offset,
3081 MHD_SSO_HDR_CORK); 3074 MHD_SSO_NO_CORK);
3082 if (ret < 0) 3075 if (ret < 0)
3083 { 3076 {
3084 if (MHD_ERR_AGAIN_ == ret) 3077 if (MHD_ERR_AGAIN_ == ret)