Mercurial > hg > nginx
diff src/http/modules/ngx_http_uwsgi_module.c @ 5078:10c74d3b15d1
Connection upgrade support in uwsgi and scgi modules.
Prodded by Roberto De Ioris.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 20 Feb 2013 16:41:05 +0000 |
parents | fd84344f1df7 |
children | 8da37c1b22a4 |
line wrap: on
line diff
--- 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) { - return NGX_OK; + goto done; } if (u->headers_in.status) { @@ -1049,6 +1049,14 @@ ngx_http_uwsgi_process_header(ngx_http_r u->state->status = u->headers_in.status_n; } + done: + + if (u->headers_in.status_n == NGX_HTTP_SWITCHING_PROTOCOLS + && r->headers_in.upgrade) + { + u->upgrade = 1; + } + return NGX_OK; }