]> git.kaiwu.me - nginx.git/commit
Proxy: support for connection upgrade (101 Switching Protocols).
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 18 Feb 2013 13:50:52 +0000 (13:50 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 18 Feb 2013 13:50:52 +0000 (13:50 +0000)
commit08a73b4aadebd9405ac52ec1f6eef5ca1fe8c11a
tree844f6f53431a2c5071b7a799a697b26631946db9
parent35c17ea6f55c202956dccdf11edcdcda432edebe
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.
src/http/modules/ngx_http_chunked_filter_module.c
src/http/modules/ngx_http_proxy_module.c
src/http/ngx_http_header_filter_module.c
src/http/ngx_http_request.c
src/http/ngx_http_request.h
src/http/ngx_http_upstream.c
src/http/ngx_http_upstream.h
src/http/ngx_http_variables.c