Mercurial > hg > nginx
comparison src/http/ngx_http_request.h @ 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 | f7fe817c92a2 |
comparison
equal
deleted
inserted
replaced
5071:e14b49c12a73 | 5072:7fa7e60a7f66 |
---|---|
62 #define NGX_HTTP_SUBREQUEST_IN_MEMORY 2 | 62 #define NGX_HTTP_SUBREQUEST_IN_MEMORY 2 |
63 #define NGX_HTTP_SUBREQUEST_WAITED 4 | 63 #define NGX_HTTP_SUBREQUEST_WAITED 4 |
64 #define NGX_HTTP_LOG_UNSAFE 8 | 64 #define NGX_HTTP_LOG_UNSAFE 8 |
65 | 65 |
66 | 66 |
67 #define NGX_HTTP_CONTINUE 100 | |
68 #define NGX_HTTP_SWITCHING_PROTOCOLS 101 | |
69 #define NGX_HTTP_PROCESSING 102 | |
70 | |
67 #define NGX_HTTP_OK 200 | 71 #define NGX_HTTP_OK 200 |
68 #define NGX_HTTP_CREATED 201 | 72 #define NGX_HTTP_CREATED 201 |
69 #define NGX_HTTP_ACCEPTED 202 | 73 #define NGX_HTTP_ACCEPTED 202 |
70 #define NGX_HTTP_NO_CONTENT 204 | 74 #define NGX_HTTP_NO_CONTENT 204 |
71 #define NGX_HTTP_PARTIAL_CONTENT 206 | 75 #define NGX_HTTP_PARTIAL_CONTENT 206 |
182 ngx_table_elt_t *range; | 186 ngx_table_elt_t *range; |
183 ngx_table_elt_t *if_range; | 187 ngx_table_elt_t *if_range; |
184 | 188 |
185 ngx_table_elt_t *transfer_encoding; | 189 ngx_table_elt_t *transfer_encoding; |
186 ngx_table_elt_t *expect; | 190 ngx_table_elt_t *expect; |
191 ngx_table_elt_t *upgrade; | |
187 | 192 |
188 #if (NGX_HTTP_GZIP) | 193 #if (NGX_HTTP_GZIP) |
189 ngx_table_elt_t *accept_encoding; | 194 ngx_table_elt_t *accept_encoding; |
190 ngx_table_elt_t *via; | 195 ngx_table_elt_t *via; |
191 #endif | 196 #endif |