diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-03-29 14:13:34 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-03-29 14:13:34 +0200 |
commit | 63721c720a31b209589fb08b416e2a45c1209910 (patch) | |
tree | 7f6edb252b0947f0ac3471abbd6298026086bb72 | |
parent | 3c2727fcea919eef5c16a9bd092edfb5eddb8cbe (diff) | |
download | libmicrohttpd-63721c720a31b209589fb08b416e2a45c1209910.tar.gz libmicrohttpd-63721c720a31b209589fb08b416e2a45c1209910.zip |
must pass size_t to default_handler
-rw-r--r-- | src/microhttpd/connection.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index 8ebc90db..29be44f1 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -1934,7 +1934,7 @@ process_request_body (struct MHD_Connection *connection) | |||
1934 | break; | 1934 | break; |
1935 | i++; | 1935 | i++; |
1936 | } | 1936 | } |
1937 | } | 1937 | } |
1938 | /* take '\n' into account; if '\n' is the unavailable | 1938 | /* take '\n' into account; if '\n' is the unavailable |
1939 | character, we will need to wait until we have it | 1939 | character, we will need to wait until we have it |
1940 | before going further */ | 1940 | before going further */ |
@@ -1963,7 +1963,7 @@ process_request_body (struct MHD_Connection *connection) | |||
1963 | if ( (i < available) && | 1963 | if ( (i < available) && |
1964 | ( ('\r' == buffer_head[i]) || | 1964 | ( ('\r' == buffer_head[i]) || |
1965 | ('\n' == buffer_head[i]) ) ) | 1965 | ('\n' == buffer_head[i]) ) ) |
1966 | i++; | 1966 | i++; |
1967 | 1967 | ||
1968 | buffer_head += i; | 1968 | buffer_head += i; |
1969 | available -= i; | 1969 | available -= i; |
@@ -1999,21 +1999,25 @@ process_request_body (struct MHD_Connection *connection) | |||
1999 | } | 1999 | } |
2000 | used = processed; | 2000 | used = processed; |
2001 | connection->client_aware = true; | 2001 | connection->client_aware = true; |
2002 | if (MHD_NO == | 2002 | { |
2003 | connection->daemon->default_handler (connection->daemon->default_handler_cls, | 2003 | size_t processed_st = (size_t) processed; |
2004 | connection, | 2004 | if (MHD_NO == |
2005 | connection->url, | 2005 | connection->daemon->default_handler (connection->daemon->default_handler_cls, |
2006 | connection->method, | 2006 | connection, |
2007 | connection->version, | 2007 | connection->url, |
2008 | buffer_head, | 2008 | connection->method, |
2009 | &processed, | 2009 | connection->version, |
2010 | &connection->client_context)) | 2010 | buffer_head, |
2011 | &processed_st, | ||
2012 | &connection->client_context)) | ||
2011 | { | 2013 | { |
2012 | /* serious internal error, close connection */ | 2014 | /* serious internal error, close connection */ |
2013 | CONNECTION_CLOSE_ERROR (connection, | 2015 | CONNECTION_CLOSE_ERROR (connection, |
2014 | _("Application reported internal error, closing connection.\n")); | 2016 | _("Application reported internal error, closing connection.\n")); |
2015 | return; | 2017 | return; |
2016 | } | 2018 | } |
2019 | processed = (uint64_t) processed_st; | ||
2020 | } | ||
2017 | if (processed > used) | 2021 | if (processed > used) |
2018 | mhd_panic (mhd_panic_cls, | 2022 | mhd_panic (mhd_panic_cls, |
2019 | __FILE__, | 2023 | __FILE__, |