aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_upstream.h
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2013-02-18 13:50:52 +0000
committerMaxim Dounin <mdounin@mdounin.ru>2013-02-18 13:50:52 +0000
commit08a73b4aadebd9405ac52ec1f6eef5ca1fe8c11a (patch)
tree844f6f53431a2c5071b7a799a697b26631946db9 /src/http/ngx_http_upstream.h
parent35c17ea6f55c202956dccdf11edcdcda432edebe (diff)
downloadnginx-08a73b4aadebd9405ac52ec1f6eef5ca1fe8c11a.tar.gz
nginx-08a73b4aadebd9405ac52ec1f6eef5ca1fe8c11a.zip
Proxy: support for connection upgrade (101 Switching Protocols).
This allows to proxy WebSockets by using configuration like this: location /chat/ { proxy_pass http://backend; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } Connection upgrade is allowed as long as it was requested by a client via the Upgrade request header.
Diffstat (limited to 'src/http/ngx_http_upstream.h')
-rw-r--r--src/http/ngx_http_upstream.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/http/ngx_http_upstream.h b/src/http/ngx_http_upstream.h
index 2c910cd9c..29ebf9bd9 100644
--- a/src/http/ngx_http_upstream.h
+++ b/src/http/ngx_http_upstream.h
@@ -284,6 +284,8 @@ struct ngx_http_upstream_s {
ngx_http_upstream_resolved_t *resolved;
+ ngx_buf_t from_client;
+
ngx_buf_t buffer;
off_t length;
@@ -329,6 +331,7 @@ struct ngx_http_upstream_s {
unsigned buffering:1;
unsigned keepalive:1;
+ unsigned upgrade:1;
unsigned request_sent:1;
unsigned header_sent:1;