summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-11-05 21:22:23 +0000
committerNick Mathewson <nickm@torproject.org>2009-11-05 21:22:23 +0000
commitac633aebdfb094b19c8c322614e3fb4739dfb0d4 (patch)
treec8b57a31ad4be62798de6c70862bfb0365e039ae /http.c
parent43ba66936aa24bde5e2e77a62365e3711cc427c2 (diff)
downloadlibevent-ac633aebdfb094b19c8c322614e3fb4739dfb0d4.tar.gz
Fix some build warnings on MSVC, mostly related to signed/unsigned comparisons.
svn:r1510
Diffstat (limited to 'http.c')
-rw-r--r--http.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/http.c b/http.c
index 33990716..c1e16e5a 100644
--- a/http.c
+++ b/http.c
@@ -781,12 +781,12 @@ evhttp_handle_chunked_read(struct evhttp_request *req, struct evbuffer *buf)
/* could not get chunk size */
return (DATA_CORRUPTED);
}
- if (req->body_size + ntoread > req->evcon->max_body_size) {
+ if (req->body_size + (size_t)ntoread > req->evcon->max_body_size) {
/* failed body length test */
event_debug(("Request body is too long"));
return (DATA_TOO_LONG);
}
- req->body_size += ntoread;
+ req->body_size += (size_t)ntoread;
req->ntoread = ntoread;
if (req->ntoread == 0) {
/* Last chunk */
@@ -2910,8 +2910,8 @@ evhttp_get_request_connection(
if (evcon == NULL)
return (NULL);
- evhttp_connection_set_max_headers_size(evcon, http->default_max_headers_size);
- evhttp_connection_set_max_body_size(evcon, http->default_max_body_size);
+ evcon->max_headers_size = http->default_max_headers_size;
+ evcon->max_body_size = http->default_max_body_size;
evcon->flags |= EVHTTP_CON_INCOMING;
evcon->state = EVCON_READING_FIRSTLINE;