Connection upgrade support in uwsgi and scgi modules.
Prodded by Roberto De Ioris.
This commit is contained in:
parent
88aba92123
commit
2045f9888a
2 changed files with 18 additions and 2 deletions
|
@ -984,7 +984,7 @@ ngx_http_scgi_process_header(ngx_http_request_t *r)
|
|||
u = r->upstream;
|
||||
|
||||
if (u->headers_in.status_n) {
|
||||
return NGX_OK;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (u->headers_in.status) {
|
||||
|
@ -1015,6 +1015,14 @@ ngx_http_scgi_process_header(ngx_http_request_t *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;
|
||||
}
|
||||
|
||||
|
|
|
@ -1018,7 +1018,7 @@ ngx_http_uwsgi_process_header(ngx_http_request_t *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_request_t *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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue