comparison src/http/ngx_http_request.c @ 354:583decdb82a4 NGINX_0_6_21

nginx 0.6.21 *) Change: if variable values used in a "proxy_pass" directive contain IP-addresses only, then a "resolver" directive is not mandatory. resolver *) Bugfix: a segmentation fault might occur in worker process if a "proxy_pass" directive with URI-part was used; bug appeared in 0.6.19. *) Bugfix: if resolver was used on platform that does not support kqueue, then nginx issued an alert "name is out of response". Thanks to Andrei Nigmatulin. *) Bugfix: if the $server_protocol was used in FastCGI parameters and a request line length was near to the "client_header_buffer_size" directive value, then nginx issued an alert "fastcgi: the request record is too big". *) Bugfix: if a plain text HTTP/0.9 version request was made to HTTPS server, then nginx returned usual response.
author Igor Sysoev <http://sysoev.ru>
date Mon, 03 Dec 2007 00:00:00 +0300
parents e10168d6e371
children b743d290eb3b
comparison
equal deleted inserted replaced
353:4a470d9e2ea5 354:583decdb82a4
1152 1152
1153 if (r->args_start) { 1153 if (r->args_start) {
1154 r->args_start = new + (r->args_start - old); 1154 r->args_start = new + (r->args_start - old);
1155 } 1155 }
1156 1156
1157 if (r->http_protocol.data) {
1158 r->http_protocol.data = new + (r->http_protocol.data - old);
1159 }
1160
1157 } else { 1161 } else {
1158 r->header_name_start = new; 1162 r->header_name_start = new;
1159 r->header_name_end = new + (r->header_name_end - old); 1163 r->header_name_end = new + (r->header_name_end - old);
1160 r->header_start = new + (r->header_start - old); 1164 r->header_start = new + (r->header_start - old);
1161 r->header_end = new + (r->header_end - old); 1165 r->header_end = new + (r->header_end - old);
1333 "client sent \"Transfer-Encoding: chunked\" header"); 1337 "client sent \"Transfer-Encoding: chunked\" header");
1334 ngx_http_finalize_request(r, NGX_HTTP_LENGTH_REQUIRED); 1338 ngx_http_finalize_request(r, NGX_HTTP_LENGTH_REQUIRED);
1335 return NGX_ERROR; 1339 return NGX_ERROR;
1336 } 1340 }
1337 1341
1338 if (r->plain_http) {
1339 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
1340 "client sent plain HTTP request to HTTPS port");
1341 ngx_http_finalize_request(r, NGX_HTTP_TO_HTTPS);
1342 return NGX_ERROR;
1343 }
1344
1345 if (r->headers_in.connection_type == NGX_HTTP_CONNECTION_KEEP_ALIVE) { 1342 if (r->headers_in.connection_type == NGX_HTTP_CONNECTION_KEEP_ALIVE) {
1346 if (r->headers_in.keep_alive) { 1343 if (r->headers_in.keep_alive) {
1347 r->headers_in.keep_alive_n = 1344 r->headers_in.keep_alive_n =
1348 ngx_atotm(r->headers_in.keep_alive->value.data, 1345 ngx_atotm(r->headers_in.keep_alive->value.data,
1349 r->headers_in.keep_alive->value.len); 1346 r->headers_in.keep_alive->value.len);
1406 long rc; 1403 long rc;
1407 ngx_http_ssl_srv_conf_t *sscf; 1404 ngx_http_ssl_srv_conf_t *sscf;
1408 #endif 1405 #endif
1409 1406
1410 c = r->connection; 1407 c = r->connection;
1408
1409 if (r->plain_http) {
1410 ngx_log_error(NGX_LOG_INFO, c->log, 0,
1411 "client sent plain HTTP request to HTTPS port");
1412 ngx_http_finalize_request(r, NGX_HTTP_TO_HTTPS);
1413 return;
1414 }
1411 1415
1412 #if (NGX_HTTP_SSL) 1416 #if (NGX_HTTP_SSL)
1413 1417
1414 if (c->ssl) { 1418 if (c->ssl) {
1415 sscf = ngx_http_get_module_srv_conf(r, ngx_http_ssl_module); 1419 sscf = ngx_http_get_module_srv_conf(r, ngx_http_ssl_module);