Klaus Demo nginx / c9482c6
do not discard body while error_page redirection Igor Sysoev 12 years ago
1 changed file(s) with 4 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
326326 ngx_int_t
327327 ngx_http_special_response_handler(ngx_http_request_t *r, ngx_int_t error)
328328 {
329 ngx_int_t rc;
330329 ngx_uint_t i, err;
331330 ngx_http_err_page_t *err_page;
332331 ngx_http_core_loc_conf_t *clcf;
334333 ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
335334 "http special response: %d, \"%V?%V\"",
336335 error, &r->uri, &r->args);
337
338 rc = ngx_http_discard_request_body(r);
339
340 if (rc == NGX_HTTP_INTERNAL_SERVER_ERROR) {
341 error = NGX_HTTP_INTERNAL_SERVER_ERROR;
342 }
343336
344337 r->err_status = error;
345338
383376 return ngx_http_send_error_page(r, &err_page[i]);
384377 }
385378 }
379 }
380
381 if (ngx_http_discard_request_body(r) != NGX_OK) {
382 error = NGX_HTTP_INTERNAL_SERVER_ERROR;
386383 }
387384
388385 if (clcf->msie_refresh