Hello!
On Wed, Feb 20, 2013 at 03:07:53PM +0100, Roberto De Ioris wrote:
when the uwsgi protocol is used instead of HTTP.
patch should be usable there too
to the nginx config to make it work
Ok, so the next question is: any specific reason to exclude normal
CGI responses with “Status” as in your patch?
I in fact don’t like the idea of supporting http-like answers with
status like from CGI-like protocols, correct way is to use
“Status” header. Not sure why Manlio introduced it at all,
probably due to some compatibility concerns (and due to the fact
that SCGI specification explicitly refuses to specify response
format).
Something like this should be better, IMHO:
diff --git a/src/http/modules/ngx_http_scgi_module.c
b/src/http/modules/ngx_http_scgi_module.c
— a/src/http/modules/ngx_http_scgi_module.c
+++ b/src/http/modules/ngx_http_scgi_module.c
@@ -984,7 +984,7 @@ ngx_http_scgi_process_header(ngx_http_re
u = r->upstream;
if (u->headers_in.status_n) {
@@ -1015,6 +1015,14 @@ ngx_http_scgi_process_header(ngx_http_re
u->state->status = u->headers_in.status_n;
}
diff --git a/src/http/modules/ngx_http_uwsgi_module.c
b/src/http/modules/ngx_http_uwsgi_module.c
— a/src/http/modules/ngx_http_uwsgi_module.c
+++ b/src/http/modules/ngx_http_uwsgi_module.c
@@ -1018,7 +1018,7 @@ ngx_http_uwsgi_process_header(ngx_http_r
u = r->upstream;
if (u->headers_in.status_n) {
@@ -1049,6 +1049,14 @@ ngx_http_uwsgi_process_header(ngx_http_r
u->state->status = u->headers_in.status_n;
}
–
Maxim D.