diff options
| author | Valentin Bartenev <vbart@nginx.com> | 2013-03-20 10:36:57 +0000 |
|---|---|---|
| committer | Valentin Bartenev <vbart@nginx.com> | 2013-03-20 10:36:57 +0000 |
| commit | 2686cb44529462614a1846f29922bb68852dafb6 (patch) | |
| tree | a46abd5e6cab450dbc23f220a424a296c0877e2b /src/http/ngx_http_core_module.c | |
| parent | cf64a6c5361b23f1aa182e50537ebb4c6c34c453 (diff) | |
| download | nginx-2686cb44529462614a1846f29922bb68852dafb6.tar.gz nginx-2686cb44529462614a1846f29922bb68852dafb6.tar.bz2 | |
Preliminary experimental support for SPDY draft 2.
Diffstat (limited to 'src/http/ngx_http_core_module.c')
| -rw-r--r-- | src/http/ngx_http_core_module.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index c4914997b..80cf2d6b9 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -2130,6 +2130,13 @@ ngx_http_gzip_ok(ngx_http_request_t *r) return NGX_DECLINED; } +#if (NGX_HTTP_SPDY) + if (r->spdy_stream) { + r->gzip_ok = 1; + return NGX_OK; + } +#endif + ae = r->headers_in.accept_encoding; if (ae == NULL) { return NGX_DECLINED; @@ -2464,6 +2471,10 @@ ngx_http_subrequest(ngx_http_request_t *r, sr->request_body = r->request_body; +#if (NGX_HTTP_SPDY) + sr->spdy_stream = r->spdy_stream; +#endif + sr->method = NGX_HTTP_GET; sr->http_version = r->http_version; @@ -4130,6 +4141,18 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) #endif } + if (ngx_strcmp(value[n].data, "spdy") == 0) { +#if (NGX_HTTP_SPDY) + lsopt.spdy = 1; + continue; +#else + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, + "the \"spdy\" parameter requires " + "ngx_http_spdy_module"); + return NGX_CONF_ERROR; +#endif + } + if (ngx_strncmp(value[n].data, "so_keepalive=", 13) == 0) { if (ngx_strcmp(&value[n].data[13], "on") == 0) { |
