comparison src/http/ngx_http_request.c @ 5072:7fa7e60a7f66

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 18 Feb 2013 13:50:52 +0000
parents 6f085bfcdb4d
children 42a888fdad0b
comparison
equal deleted inserted replaced
5071:e14b49c12a73 5072:7fa7e60a7f66
127 ngx_http_process_header_line }, 127 ngx_http_process_header_line },
128 128
129 { ngx_string("Expect"), 129 { ngx_string("Expect"),
130 offsetof(ngx_http_headers_in_t, expect), 130 offsetof(ngx_http_headers_in_t, expect),
131 ngx_http_process_unique_header_line }, 131 ngx_http_process_unique_header_line },
132
133 { ngx_string("Upgrade"),
134 offsetof(ngx_http_headers_in_t, upgrade),
135 ngx_http_process_header_line },
132 136
133 #if (NGX_HTTP_GZIP) 137 #if (NGX_HTTP_GZIP)
134 { ngx_string("Accept-Encoding"), 138 { ngx_string("Accept-Encoding"),
135 offsetof(ngx_http_headers_in_t, accept_encoding), 139 offsetof(ngx_http_headers_in_t, accept_encoding),
136 ngx_http_process_header_line }, 140 ngx_http_process_header_line },