Lines Matching refs:ntoread
927 if (req->ntoread < 0) {
929 ev_int64_t ntoread;
940 ntoread = evutil_strtoll(p, &endp, 16);
943 ntoread < 0);
950 /* ntoread is signed int64, body_size is unsigned size_t, check for under/overflow conditions */
951 if ((ev_uint64_t)ntoread > EV_SIZE_MAX - req->body_size) {
955 if (req->body_size + (size_t)ntoread > req->evcon->max_body_size) {
961 req->body_size += (size_t)ntoread;
962 req->ntoread = ntoread;
963 if (req->ntoread == 0) {
970 /* req->ntoread is signed int64, len is ssize_t, based on arch,
972 if (req->ntoread > EV_SSIZE_MAX) {
977 if (req->ntoread > 0 && buflen < (ev_uint64_t)req->ntoread)
981 evbuffer_remove_buffer(buf, req->input_buffer, (size_t)req->ntoread);
982 req->ntoread = -1;
1026 if (n > (size_t) req->ntoread)
1027 n = (size_t) req->ntoread;
1028 req->ntoread -= n;
1032 EV_I64_ARG(req->ntoread)));
1035 if (!req->ntoread)
1074 } else if (req->ntoread < 0) {
1083 } else if (req->chunk_cb != NULL || evbuffer_get_length(buf) >= (size_t)req->ntoread) {
1089 if (n > (size_t) req->ntoread)
1090 n = (size_t) req->ntoread;
1091 req->ntoread -= n;
1097 (!req->chunked && req->ntoread >= 0 &&
1098 (size_t)req->ntoread > req->evcon->max_body_size)) {
1118 if (!req->ntoread) {
1502 if (!req->chunked && req->ntoread < 0
2171 req->ntoread = -1;
2174 req->ntoread = 0;
2176 req->ntoread = -1;
2179 ev_int64_t ntoread = evutil_strtoll(content_length, &endp, 10);
2180 if (*content_length == '\0' || *endp != '\0' || ntoread < 0) {
2185 req->ntoread = ntoread;
2189 __func__, EV_I64_ARG(req->ntoread),
2231 req->ntoread = -1;
2237 if (req->kind == EVHTTP_REQUEST && req->ntoread < 1) {
2254 if (req->ntoread > 0) {
2255 /* ntoread is ev_int64_t, max_body_size is ev_uint64_t */
2257 (ev_uint64_t)req->ntoread > req->evcon->max_body_size) {