comparison src/http/ngx_http_core_module.c @ 6246:257b51c37c5a

The HTTP/2 implementation (RFC 7240, 7241). The SPDY support is removed, as it's incompatible with the new module.
author Valentin Bartenev <vbart@nginx.com>
date Fri, 11 Sep 2015 20:13:06 +0300
parents 055d1f63960a
children 1063097b22b6
comparison
equal deleted inserted replaced
6245:3cf25d33886a 6246:257b51c37c5a
2130 2130
2131 if (r != r->main) { 2131 if (r != r->main) {
2132 return NGX_DECLINED; 2132 return NGX_DECLINED;
2133 } 2133 }
2134 2134
2135 #if (NGX_HTTP_SPDY)
2136 if (r->spdy_stream) {
2137 r->gzip_ok = 1;
2138 return NGX_OK;
2139 }
2140 #endif
2141
2142 ae = r->headers_in.accept_encoding; 2135 ae = r->headers_in.accept_encoding;
2143 if (ae == NULL) { 2136 if (ae == NULL) {
2144 return NGX_DECLINED; 2137 return NGX_DECLINED;
2145 } 2138 }
2146 2139
2478 ngx_http_clear_accept_ranges(sr); 2471 ngx_http_clear_accept_ranges(sr);
2479 ngx_http_clear_last_modified(sr); 2472 ngx_http_clear_last_modified(sr);
2480 2473
2481 sr->request_body = r->request_body; 2474 sr->request_body = r->request_body;
2482 2475
2483 #if (NGX_HTTP_SPDY) 2476 #if (NGX_HTTP_V2)
2484 sr->spdy_stream = r->spdy_stream; 2477 sr->stream = r->stream;
2485 #endif 2478 #endif
2486 2479
2487 sr->method = NGX_HTTP_GET; 2480 sr->method = NGX_HTTP_GET;
2488 sr->http_version = r->http_version; 2481 sr->http_version = r->http_version;
2489 2482
4201 "ngx_http_ssl_module"); 4194 "ngx_http_ssl_module");
4202 return NGX_CONF_ERROR; 4195 return NGX_CONF_ERROR;
4203 #endif 4196 #endif
4204 } 4197 }
4205 4198
4206 if (ngx_strcmp(value[n].data, "spdy") == 0) { 4199 if (ngx_strcmp(value[n].data, "http2") == 0) {
4207 #if (NGX_HTTP_SPDY) 4200 #if (NGX_HTTP_V2)
4208 lsopt.spdy = 1; 4201 lsopt.http2 = 1;
4209 continue; 4202 continue;
4210 #else 4203 #else
4211 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 4204 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
4212 "the \"spdy\" parameter requires " 4205 "the \"http2\" parameter requires "
4213 "ngx_http_spdy_module"); 4206 "ngx_http_v2_module");
4214 return NGX_CONF_ERROR; 4207 return NGX_CONF_ERROR;
4215 #endif 4208 #endif
4209 }
4210
4211 if (ngx_strcmp(value[n].data, "spdy") == 0) {
4212 ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
4213 "invalid parameter \"spdy\": "
4214 "ngx_http_spdy_module was superseded "
4215 "by ngx_http_v2_module");
4216 continue;
4216 } 4217 }
4217 4218
4218 if (ngx_strncmp(value[n].data, "so_keepalive=", 13) == 0) { 4219 if (ngx_strncmp(value[n].data, "so_keepalive=", 13) == 0) {
4219 4220
4220 if (ngx_strcmp(&value[n].data[13], "on") == 0) { 4221 if (ngx_strcmp(&value[n].data[13], "on") == 0) {