commit 63721c720a31b209589fb08b416e2a45c1209910
parent 3c2727fcea919eef5c16a9bd092edfb5eddb8cbe
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 29 Mar 2017 14:13:34 +0200
must pass size_t to default_handler
Diffstat:
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
@@ -1934,7 +1934,7 @@ process_request_body (struct MHD_Connection *connection)
break;
i++;
}
- }
+ }
/* take '\n' into account; if '\n' is the unavailable
character, we will need to wait until we have it
before going further */
@@ -1963,7 +1963,7 @@ process_request_body (struct MHD_Connection *connection)
if ( (i < available) &&
( ('\r' == buffer_head[i]) ||
('\n' == buffer_head[i]) ) )
- i++;
+ i++;
buffer_head += i;
available -= i;
@@ -1999,21 +1999,25 @@ process_request_body (struct MHD_Connection *connection)
}
used = processed;
connection->client_aware = true;
- if (MHD_NO ==
- connection->daemon->default_handler (connection->daemon->default_handler_cls,
- connection,
- connection->url,
- connection->method,
- connection->version,
- buffer_head,
- &processed,
- &connection->client_context))
+ {
+ size_t processed_st = (size_t) processed;
+ if (MHD_NO ==
+ connection->daemon->default_handler (connection->daemon->default_handler_cls,
+ connection,
+ connection->url,
+ connection->method,
+ connection->version,
+ buffer_head,
+ &processed_st,
+ &connection->client_context))
{
/* serious internal error, close connection */
CONNECTION_CLOSE_ERROR (connection,
_("Application reported internal error, closing connection.\n"));
return;
}
+ processed = (uint64_t) processed_st;
+ }
if (processed > used)
mhd_panic (mhd_panic_cls,
__FILE__,