comparison src/http/ngx_http_request_body.c @ 475:c3c2848fc081 release-0.1.12

nginx-0.1.12-RELEASE import *) Feature: the %request_length log parameter. *) Bugfix: when using the /dev/poll, select and poll on the platforms, where these methods may do the false reports, there may be the long delay when the request was passed via the keep-alive connection. It may be at least on Solaris when using the /dev/poll. *) Bugfix: the send_lowat directive is ignored on Linux because Linux does not support the SO_SNDLOWAT option.
author Igor Sysoev <igor@sysoev.ru>
date Mon, 06 Dec 2004 14:45:08 +0000
parents a88a3e4e158f
children c52408583801
comparison
equal deleted inserted replaced
474:99ad6d3b40ed 475:c3c2848fc081
40 if (size >= r->headers_in.content_length_n) { 40 if (size >= r->headers_in.content_length_n) {
41 41
42 /* the whole request body was pre-read */ 42 /* the whole request body was pre-read */
43 43
44 r->header_in->pos += r->headers_in.content_length_n; 44 r->header_in->pos += r->headers_in.content_length_n;
45 r->request_length += r->headers_in.content_length_n;
45 46
46 r->request_body->handler(r->request_body->data); 47 r->request_body->handler(r->request_body->data);
47 48
48 return NGX_OK; 49 return NGX_OK;
49 } 50 }
50 51
51 r->header_in->pos = r->header_in->last; 52 r->header_in->pos = r->header_in->last;
53 r->request_length += size;
52 } 54 }
53 55
54 56
55 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); 57 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
56 58
171 return NGX_HTTP_BAD_REQUEST; 173 return NGX_HTTP_BAD_REQUEST;
172 } 174 }
173 175
174 r->request_body->buf->last += n; 176 r->request_body->buf->last += n;
175 r->request_body->rest -= n; 177 r->request_body->rest -= n;
178 r->request_length += n;
176 179
177 if (r->request_body->rest == 0) { 180 if (r->request_body->rest == 0) {
178 break; 181 break;
179 } 182 }
180 183