comparison src/http/ngx_http_core_module.c @ 4973:44fcb9677c3f

Avoid sending "100 Continue" on 413 Request Entity Too Large. Patch by Igor Sysoev.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 18 Dec 2012 18:39:39 +0000
parents 4251e72b8bb4
children f7fe817c92a2
comparison
equal deleted inserted replaced
4972:8b635cf36ccc 4973:44fcb9677c3f
999 { 999 {
1000 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, 1000 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
1001 "client intended to send too large body: %O bytes", 1001 "client intended to send too large body: %O bytes",
1002 r->headers_in.content_length_n); 1002 r->headers_in.content_length_n);
1003 1003
1004 r->expect_tested = 1;
1004 (void) ngx_http_discard_request_body(r); 1005 (void) ngx_http_discard_request_body(r);
1005 ngx_http_finalize_request(r, NGX_HTTP_REQUEST_ENTITY_TOO_LARGE); 1006 ngx_http_finalize_request(r, NGX_HTTP_REQUEST_ENTITY_TOO_LARGE);
1006 return NGX_OK; 1007 return NGX_OK;
1007 } 1008 }
1008 1009