aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-10-21 10:04:35 +0200
committerChristian Grothoff <christian@grothoff.org>2020-10-21 10:04:35 +0200
commiteb82d9a7c32225c5c81f0e6d734e6180a79bb697 (patch)
tree16592b98ebd646ee379023e43466b17c9dd38b4e
parent567aa11a97f0562842f10e2763fb4804166a0cb2 (diff)
downloadlibmicrohttpd-eb82d9a7c32225c5c81f0e6d734e6180a79bb697.tar.gz
libmicrohttpd-eb82d9a7c32225c5c81f0e6d734e6180a79bb697.zip
-undo bad indentation patch, updated uncrustify now
-rw-r--r--src/microhttpd/connection.c35
1 files changed, 21 insertions, 14 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 94ed459d..092c729d 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -615,7 +615,8 @@ 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. */if (0 != (daemon->options & MHD_USE_TLS)) 618 * remote side as end of transmission. */
619 if (0 != (daemon->options & MHD_USE_TLS))
619 { 620 {
620 if (! MHD_tls_connection_shutdown (connection)) 621 if (! MHD_tls_connection_shutdown (connection))
621 shutdown (connection->socket_fd, 622 shutdown (connection->socket_fd,
@@ -729,7 +730,8 @@ MHD_connection_finish_forward_ (struct MHD_Connection *connection)
729 * used with MHD_UPGRADE_ACTION_CLOSE. They will be 730 * used with MHD_UPGRADE_ACTION_CLOSE. They will be
730 * closed by MHD_cleanup_upgraded_connection_() during 731 * closed by MHD_cleanup_upgraded_connection_() during
731 * connection's final cleanup. 732 * connection's final cleanup.
732 */} 733 */
734}
733 735
734 736
735#endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT*/ 737#endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT*/
@@ -1142,7 +1144,8 @@ try_grow_read_buffer (struct MHD_Connection *connection,
1142 the right position in the pool, say because someone called 1144 the right position in the pool, say because someone called
1143 MHD_pool_allocate() without 'from_end' set to 'true'? Anyway, 1145 MHD_pool_allocate() without 'from_end' set to 'true'? Anyway,
1144 should be investigated! (Ideally provide all data from 1146 should be investigated! (Ideally provide all data from
1145 *pool and connection->read_buffer and new_size for debugging). */mhd_assert (0); 1147 *pool and connection->read_buffer and new_size for debugging). */
1148 mhd_assert (0);
1146 return false; 1149 return false;
1147 } 1150 }
1148 connection->read_buffer = rb; 1151 connection->read_buffer = rb;
@@ -1367,7 +1370,8 @@ build_header_response (struct MHD_Connection *connection)
1367 1370
1368 Note that the change from 'SHOULD NOT' to 'MUST NOT' is 1371 Note that the change from 'SHOULD NOT' to 'MUST NOT' is
1369 a recent development of the HTTP 1.1 specification. 1372 a recent development of the HTTP 1.1 specification.
1370 */content_length_len 1373 */
1374 content_length_len
1371 = MHD_snprintf_ (content_length_buf, 1375 = MHD_snprintf_ (content_length_buf,
1372 sizeof (content_length_buf), 1376 sizeof (content_length_buf),
1373 MHD_HTTP_HEADER_CONTENT_LENGTH ": " 1377 MHD_HTTP_HEADER_CONTENT_LENGTH ": "
@@ -1700,7 +1704,8 @@ MHD_connection_update_event_loop_info (struct MHD_Connection *connection)
1700 or if we do nothing, we would just timeout 1704 or if we do nothing, we would just timeout
1701 on the connection (if a timeout is even 1705 on the connection (if a timeout is even
1702 set!). 1706 set!).
1703 Solution: we kill the connection with an error */transmit_error_response (connection, 1707 Solution: we kill the connection with an error */
1708 transmit_error_response (connection,
1704 MHD_HTTP_INTERNAL_SERVER_ERROR, 1709 MHD_HTTP_INTERNAL_SERVER_ERROR,
1705 INTERNAL_ERROR); 1710 INTERNAL_ERROR);
1706 continue; 1711 continue;
@@ -2474,7 +2479,8 @@ process_header_line (struct MHD_Connection *connection,
2474 header at the beginning of the while 2479 header at the beginning of the while
2475 loop since we need to be able to inspect 2480 loop since we need to be able to inspect
2476 the *next* header line (in case it starts 2481 the *next* header line (in case it starts
2477 with a space...) */connection->last = line; 2482 with a space...) */
2483 connection->last = line;
2478 connection->colon = colon; 2484 connection->colon = colon;
2479 return MHD_YES; 2485 return MHD_YES;
2480} 2486}
@@ -2514,14 +2520,15 @@ process_broken_line (struct MHD_Connection *connection,
2514 tmp++; 2520 tmp++;
2515 tmp_len = strlen (tmp); 2521 tmp_len = strlen (tmp);
2516 /* FIXME: we might be able to do this better (faster!), as most 2522 /* FIXME: we might be able to do this better (faster!), as most
2517 likely 'last' and 'line' should already be adjacent in 2523 likely 'last' and 'line' should already be adjacent in
2518 memory; however, doing this right gets tricky if we have a 2524 memory; however, doing this right gets tricky if we have a
2519 value continued over multiple lines (in which case we need to 2525 value continued over multiple lines (in which case we need to
2520 record how often we have done this so we can check for 2526 record how often we have done this so we can check for
2521 adjacency); also, in the case where these are not adjacent 2527 adjacency); also, in the case where these are not adjacent
2522 (not sure how it can happen!), we would want to allocate from 2528 (not sure how it can happen!), we would want to allocate from
2523 the end of the pool, so as to not destroy the read-buffer's 2529 the end of the pool, so as to not destroy the read-buffer's
2524 ability to grow nicely. */last = MHD_pool_reallocate (connection->pool, 2530 ability to grow nicely. */
2531 last = MHD_pool_reallocate (connection->pool,
2525 last, 2532 last,
2526 last_len + 1, 2533 last_len + 1,
2527 last_len + tmp_len + 1); 2534 last_len + tmp_len + 1);