Mercurial > hg > nginx
comparison src/http/ngx_http_core_module.c @ 3078:680cab09818d
discard request body before returning 413 error,
this fixes custom 413 page redirection bug introduced in r1456
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 01 Sep 2009 12:47:34 +0000 |
parents | 67dc311964b8 |
children | 1c4fcfe57af1 |
comparison
equal
deleted
inserted
replaced
3077:98f03cd8d6cc | 3078:680cab09818d |
---|---|
915 { | 915 { |
916 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, | 916 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, |
917 "client intended to send too large body: %O bytes", | 917 "client intended to send too large body: %O bytes", |
918 r->headers_in.content_length_n); | 918 r->headers_in.content_length_n); |
919 | 919 |
920 (void) ngx_http_discard_request_body(r); | |
920 ngx_http_finalize_request(r, NGX_HTTP_REQUEST_ENTITY_TOO_LARGE); | 921 ngx_http_finalize_request(r, NGX_HTTP_REQUEST_ENTITY_TOO_LARGE); |
921 return NGX_OK; | 922 return NGX_OK; |
922 } | 923 } |
923 | 924 |
924 if (rc == NGX_DONE) { | 925 if (rc == NGX_DONE) { |