comparison src/http/ngx_http_event.c @ 104:7db96f59bc29

nginx-0.0.1-2003-06-12-09:54:39 import
author Igor Sysoev <igor@sysoev.ru>
date Thu, 12 Jun 2003 05:54:39 +0000
parents 6dfda4cf5200
children ac69ab96328d
comparison
equal deleted inserted replaced
103:6dfda4cf5200 104:7db96f59bc29
1033 } 1033 }
1034 1034
1035 1035
1036 static int ngx_http_read_discarded_body(ngx_http_request_t *r) 1036 static int ngx_http_read_discarded_body(ngx_http_request_t *r)
1037 { 1037 {
1038 size_t size; 1038 ssize_t size, n;
1039 ssize_t n;
1040 ngx_http_core_loc_conf_t *clcf; 1039 ngx_http_core_loc_conf_t *clcf;
1041 1040
1042 ngx_log_debug(r->connection->log, "http read discarded body"); 1041 ngx_log_debug(r->connection->log, "http read discarded body");
1043 1042
1044 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); 1043 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
1316 1315
1317 /* TODO: r->header_in->start (if large headers are enabled) 1316 /* TODO: r->header_in->start (if large headers are enabled)
1318 or the end of parsed header (otherwise) 1317 or the end of parsed header (otherwise)
1319 instead of r->header_in->last */ 1318 instead of r->header_in->last */
1320 1319
1321 if ((size_t)(r->header_in->end - r->header_in->last) 1320 if (r->header_in->end - r->header_in->last
1322 >= clcf->discarded_buffer_size) { 1321 >= clcf->discarded_buffer_size) {
1323 r->discarded_buffer = r->header_in->last; 1322 r->discarded_buffer = r->header_in->last;
1324 1323
1325 } else { 1324 } else {
1326 r->discarded_buffer = ngx_palloc(c->pool, 1325 r->discarded_buffer = ngx_palloc(c->pool,