mirror of
https://github.com/nginx/nginx.git
synced 2024-12-12 02:09:04 +08:00
Connection upgrade support in uwsgi and scgi modules.
Prodded by Roberto De Ioris.
This commit is contained in:
parent
59db08a6fc
commit
208fc03e7c
@ -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 New Issue
Block a user