comparison src/http/ngx_http_request_body.c @ 214:0ad9eeb6ac7f NGINX_0_3_54

nginx 0.3.54 *) Feature: nginx now logs the subrequest information to the error log. *) Feature: the "proxy_next_upstream", "fastcgi_next_upstream", and "memcached_next_upstream" directives support the "off" parameter. *) Feature: the "debug_connection" directive supports the CIDR address form. *) Bugfix: if a response of proxied server or FastCGI server was converted from UTF-8 or back, then it may be transferred incomplete. *) Bugfix: the $upstream_response_time variable had the time of the first request to a backend only. *) Bugfix: nginx could not be built on amd64 platform; bug appeared in 0.3.53.
author Igor Sysoev <http://sysoev.ru>
date Tue, 11 Jul 2006 00:00:00 +0400
parents 56688ed172c8
children fa32d59d9a15
comparison
equal deleted inserted replaced
213:405beeeadf7f 214:0ad9eeb6ac7f
90 } 90 }
91 91
92 rb->bufs->buf = b; 92 rb->bufs->buf = b;
93 rb->bufs->next = NULL; 93 rb->bufs->next = NULL;
94 94
95 if (preread >= r->headers_in.content_length_n) { 95 if ((off_t) preread >= r->headers_in.content_length_n) {
96 96
97 /* the whole request body was pre-read */ 97 /* the whole request body was pre-read */
98 98
99 r->header_in->pos += (size_t) r->headers_in.content_length_n; 99 r->header_in->pos += (size_t) r->headers_in.content_length_n;
100 r->request_length += r->headers_in.content_length_n; 100 r->request_length += r->headers_in.content_length_n;
118 118
119 r->request_length += preread; 119 r->request_length += preread;
120 120
121 rb->rest = r->headers_in.content_length_n - preread; 121 rb->rest = r->headers_in.content_length_n - preread;
122 122
123 if (rb->rest <= (size_t) (b->end - b->last)) { 123 if (rb->rest <= (off_t) (b->end - b->last)) {
124 124
125 /* the whole request body may be placed in r->header_in */ 125 /* the whole request body may be placed in r->header_in */
126 126
127 rb->buf = b; 127 rb->buf = b;
128 128
240 rb->buf->last = rb->buf->start; 240 rb->buf->last = rb->buf->start;
241 } 241 }
242 242
243 size = rb->buf->end - rb->buf->last; 243 size = rb->buf->end - rb->buf->last;
244 244
245 if (size > rb->rest) { 245 if ((off_t) size > rb->rest) {
246 size = (size_t) rb->rest; 246 size = (size_t) rb->rest;
247 } 247 }
248 248
249 n = c->recv(c, rb->buf->last, size); 249 n = c->recv(c, rb->buf->last, size);
250 250