57 if (ngx_http_test_expect(r) !=
NGX_OK) {
95 "http client request body preread %uz", preread);
100 rc = ngx_http_request_body_filter(r, &out);
131 rc = ngx_http_do_read_client_request_body(r);
138 if (ngx_http_request_body_filter(r, NULL) !=
NGX_OK) {
148 if (ngx_http_write_request_body(r) !=
NGX_OK) {
176 "negative request body rest");
189 size = (ssize_t) rb->
rest;
200 if (rb->
buf == NULL) {
208 rc = ngx_http_do_read_client_request_body(r);
231 rc = ngx_http_do_read_client_request_body(r);
256 "http read client request body");
267 rc = ngx_http_request_body_filter(r, &out);
275 if (ngx_http_write_request_body(r) !=
NGX_OK) {
281 rc = ngx_http_request_body_filter(r, NULL);
287 if (rb->
busy != NULL) {
298 if ((off_t) size > rest) {
299 size = (size_t) rest;
305 "http client request body recv %z", n);
313 "client prematurely closed connection");
330 rc = ngx_http_request_body_filter(r, &out);
347 "http client request body rest %O", rb->
rest);
373 if (ngx_http_write_request_body(r) !=
NGX_OK) {
413 "http write client request body, bufs %p", rb->
bufs);
427 tf->
warn =
"a client request body is buffered to a temporary file";
438 if (rb->
bufs == NULL) {
452 if (rb->
bufs == NULL) {
468 for (cl = rb->
bufs; cl; cl = cl->
next) {
486 if (r->spdy_stream && r == r->
main) {
496 if (ngx_http_test_expect(r) !=
NGX_OK) {
515 rc = ngx_http_discard_request_body_filter(r, r->
header_in);
526 rc = ngx_http_read_discarded_request_body(r);
585 rc = ngx_http_read_discarded_request_body(r);
633 "http read discarded body");
670 rc = ngx_http_discard_request_body_filter(r, &b);
746 "client sent invalid chunked body");
785 if (expect->
len !=
sizeof(
"100-continue") - 1
787 sizeof(
"100-continue") - 1)
794 "send 100 Continue");
797 (u_char *)
"HTTP/1.1 100 Continue" CRLF CRLF,
798 sizeof(
"HTTP/1.1 100 Continue" CRLF CRLF) - 1);
800 if (n ==
sizeof(
"HTTP/1.1 100 Continue" CRLF CRLF) - 1) {
814 return ngx_http_request_body_chunked_filter(r, in);
817 return ngx_http_request_body_length_filter(r, in);
833 if (rb->
rest == -1) {
835 "http request body content length filter");
843 for (cl = in; cl; cl = cl->
next) {
863 if ((off_t) size < rb->
rest) {
878 rc = ngx_http_request_body_save_filter(r, out);
899 if (rb->
rest == -1) {
902 "http request body chunked filter");
916 for (cl = in; cl; cl = cl->
next) {
921 "http body chunked buf "
922 "t:%d f:%d %p, pos %p, size: %z file: %O, size: %z",
942 "client intended to send too large chunked "
1024 "client sent invalid chunked body");
1030 rc = ngx_http_request_body_save_filter(r, out);
1051 for (cl = rb->
bufs; cl; cl = cl->
next) {
1053 "http body old buf t:%d f:%d %p, pos %p, size: %z "
1054 "file: %O, size: %z",
1062 for (cl = in; cl; cl = cl->
next) {
1064 "http body new buf t:%d f:%d %p, pos %p, size: %z "
1065 "file: %O, size: %z",