comparison src/http/ngx_http_core_module.c @ 5121:c0f7b94e88ba

Preliminary experimental support for SPDY draft 2.
author Valentin Bartenev <vbart@nginx.com>
date Wed, 20 Mar 2013 10:36:57 +0000
parents 1b204b8ea9a3
children 4bcd35e7a0f0
comparison
equal deleted inserted replaced
5120:7956af6b6a02 5121:c0f7b94e88ba
2128 2128
2129 if (r != r->main) { 2129 if (r != r->main) {
2130 return NGX_DECLINED; 2130 return NGX_DECLINED;
2131 } 2131 }
2132 2132
2133 #if (NGX_HTTP_SPDY)
2134 if (r->spdy_stream) {
2135 r->gzip_ok = 1;
2136 return NGX_OK;
2137 }
2138 #endif
2139
2133 ae = r->headers_in.accept_encoding; 2140 ae = r->headers_in.accept_encoding;
2134 if (ae == NULL) { 2141 if (ae == NULL) {
2135 return NGX_DECLINED; 2142 return NGX_DECLINED;
2136 } 2143 }
2137 2144
2461 ngx_http_clear_content_length(sr); 2468 ngx_http_clear_content_length(sr);
2462 ngx_http_clear_accept_ranges(sr); 2469 ngx_http_clear_accept_ranges(sr);
2463 ngx_http_clear_last_modified(sr); 2470 ngx_http_clear_last_modified(sr);
2464 2471
2465 sr->request_body = r->request_body; 2472 sr->request_body = r->request_body;
2473
2474 #if (NGX_HTTP_SPDY)
2475 sr->spdy_stream = r->spdy_stream;
2476 #endif
2466 2477
2467 sr->method = NGX_HTTP_GET; 2478 sr->method = NGX_HTTP_GET;
2468 sr->http_version = r->http_version; 2479 sr->http_version = r->http_version;
2469 2480
2470 sr->request_line = r->request_line; 2481 sr->request_line = r->request_line;
4128 "ngx_http_ssl_module"); 4139 "ngx_http_ssl_module");
4129 return NGX_CONF_ERROR; 4140 return NGX_CONF_ERROR;
4130 #endif 4141 #endif
4131 } 4142 }
4132 4143
4144 if (ngx_strcmp(value[n].data, "spdy") == 0) {
4145 #if (NGX_HTTP_SPDY)
4146 lsopt.spdy = 1;
4147 continue;
4148 #else
4149 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
4150 "the \"spdy\" parameter requires "
4151 "ngx_http_spdy_module");
4152 return NGX_CONF_ERROR;
4153 #endif
4154 }
4155
4133 if (ngx_strncmp(value[n].data, "so_keepalive=", 13) == 0) { 4156 if (ngx_strncmp(value[n].data, "so_keepalive=", 13) == 0) {
4134 4157
4135 if (ngx_strcmp(&value[n].data[13], "on") == 0) { 4158 if (ngx_strcmp(&value[n].data[13], "on") == 0) {
4136 lsopt.so_keepalive = 1; 4159 lsopt.so_keepalive = 1;
4137 4160