reset a parsing state to parse correctly an upstream response,
if 400 or 414 response has been redirected to upstream
This commit is contained in:
parent
4153ebe965
commit
8248b0826a
1 changed files with 2 additions and 0 deletions
|
@ -637,6 +637,7 @@ ngx_http_proxy_handler(ngx_http_request_t *r)
|
||||||
u->process_header = ngx_http_proxy_process_status_line;
|
u->process_header = ngx_http_proxy_process_status_line;
|
||||||
u->abort_request = ngx_http_proxy_abort_request;
|
u->abort_request = ngx_http_proxy_abort_request;
|
||||||
u->finalize_request = ngx_http_proxy_finalize_request;
|
u->finalize_request = ngx_http_proxy_finalize_request;
|
||||||
|
r->state = 0;
|
||||||
|
|
||||||
if (plcf->redirects) {
|
if (plcf->redirects) {
|
||||||
u->rewrite_redirect = ngx_http_proxy_rewrite_redirect;
|
u->rewrite_redirect = ngx_http_proxy_rewrite_redirect;
|
||||||
|
@ -1198,6 +1199,7 @@ ngx_http_proxy_reinit_request(ngx_http_request_t *r)
|
||||||
ctx->status_end = NULL;
|
ctx->status_end = NULL;
|
||||||
|
|
||||||
r->upstream->process_header = ngx_http_proxy_process_status_line;
|
r->upstream->process_header = ngx_http_proxy_process_status_line;
|
||||||
|
r->state = 0;
|
||||||
|
|
||||||
return NGX_OK;
|
return NGX_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue