comparison src/http/modules/ngx_http_chunked_filter_module.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 d620f497c50f
children b1858fc47e3b
comparison
equal deleted inserted replaced
5071:e14b49c12a73 5072:7fa7e60a7f66
60 ngx_http_core_loc_conf_t *clcf; 60 ngx_http_core_loc_conf_t *clcf;
61 ngx_http_chunked_filter_ctx_t *ctx; 61 ngx_http_chunked_filter_ctx_t *ctx;
62 62
63 if (r->headers_out.status == NGX_HTTP_NOT_MODIFIED 63 if (r->headers_out.status == NGX_HTTP_NOT_MODIFIED
64 || r->headers_out.status == NGX_HTTP_NO_CONTENT 64 || r->headers_out.status == NGX_HTTP_NO_CONTENT
65 || r->headers_out.status < NGX_HTTP_OK
65 || r != r->main 66 || r != r->main
66 || (r->method & NGX_HTTP_HEAD)) 67 || (r->method & NGX_HTTP_HEAD))
67 { 68 {
68 return ngx_http_next_header_filter(r); 69 return ngx_http_next_header_filter(r);
69 } 70 }