Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_fastcgi_module.c @ 4662:979e0f5b196d stable-1.2
Merge of r4616: r->state fix.
Added r->state reset on fastcgi/scgi/uwsgi request start.
Failing to do so results in problems if 400 or 414 requests are
redirected to fastcgi/scgi/uwsgi upstream, as well as after invalid
headers got from upstream. This was already fixed for proxy in r3478,
but fastcgi (the only affected protocol at that time) was missed.
Reported by Matthieu Tourne.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 04 Jun 2012 10:54:48 +0000 |
parents | 834049edae24 |
children | b194fb640d3e |
comparison
equal
deleted
inserted
replaced
4661:eb565752dd8e | 4662:979e0f5b196d |
---|---|
617 u->create_request = ngx_http_fastcgi_create_request; | 617 u->create_request = ngx_http_fastcgi_create_request; |
618 u->reinit_request = ngx_http_fastcgi_reinit_request; | 618 u->reinit_request = ngx_http_fastcgi_reinit_request; |
619 u->process_header = ngx_http_fastcgi_process_header; | 619 u->process_header = ngx_http_fastcgi_process_header; |
620 u->abort_request = ngx_http_fastcgi_abort_request; | 620 u->abort_request = ngx_http_fastcgi_abort_request; |
621 u->finalize_request = ngx_http_fastcgi_finalize_request; | 621 u->finalize_request = ngx_http_fastcgi_finalize_request; |
622 r->state = 0; | |
622 | 623 |
623 u->buffering = 1; | 624 u->buffering = 1; |
624 | 625 |
625 u->pipe = ngx_pcalloc(r->pool, sizeof(ngx_event_pipe_t)); | 626 u->pipe = ngx_pcalloc(r->pool, sizeof(ngx_event_pipe_t)); |
626 if (u->pipe == NULL) { | 627 if (u->pipe == NULL) { |
1192 | 1193 |
1193 f->state = ngx_http_fastcgi_st_version; | 1194 f->state = ngx_http_fastcgi_st_version; |
1194 f->fastcgi_stdout = 0; | 1195 f->fastcgi_stdout = 0; |
1195 f->large_stderr = 0; | 1196 f->large_stderr = 0; |
1196 | 1197 |
1198 r->state = 0; | |
1199 | |
1197 return NGX_OK; | 1200 return NGX_OK; |
1198 } | 1201 } |
1199 | 1202 |
1200 | 1203 |
1201 static ngx_int_t | 1204 static ngx_int_t |