Lines Matching refs:ntoread
908 if (req->ntoread < 0) { in evhttp_handle_chunked_read()
910 ev_int64_t ntoread; in evhttp_handle_chunked_read() local
921 ntoread = evutil_strtoll(p, &endp, 16); in evhttp_handle_chunked_read()
924 ntoread < 0); in evhttp_handle_chunked_read()
932 if ((ev_uint64_t)ntoread > EV_SIZE_MAX - req->body_size) { in evhttp_handle_chunked_read()
936 if (req->body_size + (size_t)ntoread > req->evcon->max_body_size) { in evhttp_handle_chunked_read()
942 req->body_size += (size_t)ntoread; in evhttp_handle_chunked_read()
943 req->ntoread = ntoread; in evhttp_handle_chunked_read()
944 if (req->ntoread == 0) { in evhttp_handle_chunked_read()
953 if (req->ntoread > EV_SSIZE_MAX) { in evhttp_handle_chunked_read()
958 if (req->ntoread > 0 && buflen < (ev_uint64_t)req->ntoread) in evhttp_handle_chunked_read()
962 evbuffer_remove_buffer(buf, req->input_buffer, (size_t)req->ntoread); in evhttp_handle_chunked_read()
963 req->ntoread = -1; in evhttp_handle_chunked_read()
1007 if (n > (size_t) req->ntoread) in evhttp_lingering_close()
1008 n = (size_t) req->ntoread; in evhttp_lingering_close()
1009 req->ntoread -= n; in evhttp_lingering_close()
1013 EV_I64_ARG(req->ntoread))); in evhttp_lingering_close()
1016 if (!req->ntoread) in evhttp_lingering_close()
1055 } else if (req->ntoread < 0) { in evhttp_read_body()
1064 } else if (req->chunk_cb != NULL || evbuffer_get_length(buf) >= (size_t)req->ntoread) { in evhttp_read_body()
1070 if (n > (size_t) req->ntoread) in evhttp_read_body()
1071 n = (size_t) req->ntoread; in evhttp_read_body()
1072 req->ntoread -= n; in evhttp_read_body()
1078 (!req->chunked && req->ntoread >= 0 && in evhttp_read_body()
1079 (size_t)req->ntoread > req->evcon->max_body_size)) { in evhttp_read_body()
1099 if (!req->ntoread) { in evhttp_read_body()
1476 if (!req->chunked && req->ntoread < 0 in evhttp_error_cb()
2123 req->ntoread = -1; in evhttp_get_body_length()
2132 req->ntoread = -1; in evhttp_get_body_length()
2135 ev_int64_t ntoread = evutil_strtoll(content_length, &endp, 10); in evhttp_get_body_length() local
2136 if (*content_length == '\0' || *endp != '\0' || ntoread < 0) { in evhttp_get_body_length()
2141 req->ntoread = ntoread; in evhttp_get_body_length()
2145 __func__, EV_I64_ARG(req->ntoread), in evhttp_get_body_length()
2188 req->ntoread = -1; in evhttp_get_body()
2194 if (req->kind == EVHTTP_REQUEST && req->ntoread < 1) { in evhttp_get_body()
2211 if (req->ntoread > 0) { in evhttp_get_body()
2214 (ev_uint64_t)req->ntoread > req->evcon->max_body_size) { in evhttp_get_body()