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.c32
1 files changed, 21 insertions, 11 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 9589a2d8..885557b5 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -765,17 +765,27 @@ need_100_continue (struct MHD_Connection *connection)
765{ 765{
766 const char *expect; 766 const char *expect;
767 767
768 return (MHD_IS_HTTP_VER_1_1_COMPAT (connection->rq.http_ver) && 768 if (! MHD_IS_HTTP_VER_1_1_COMPAT (connection->rq.http_ver))
769 (MHD_NO != 769 return false;
770 MHD_lookup_connection_value_n (connection, 770
771 MHD_HEADER_KIND, 771 if (0 == connection->rq.remaining_upload_size)
772 MHD_HTTP_HEADER_EXPECT, 772 return false;
773 MHD_STATICSTR_LEN_ ( 773
774 MHD_HTTP_HEADER_EXPECT), 774 if (MHD_NO ==
775 &expect, 775 MHD_lookup_connection_value_n (connection,
776 NULL)) && 776 MHD_HEADER_KIND,
777 (MHD_str_equal_caseless_ (expect, 777 MHD_HTTP_HEADER_EXPECT,
778 "100-continue")) ); 778 MHD_STATICSTR_LEN_ ( \
779 MHD_HTTP_HEADER_EXPECT),
780 &expect,
781 NULL))
782 return false;
783
784 if (MHD_str_equal_caseless_ (expect,
785 "100-continue"))
786 return true;
787
788 return false;
779} 789}
780 790
781 791