Mercurial > hg > nginx-mail
comparison src/http/ngx_http_request.c @ 340:10cc350ed8a1 NGINX_0_6_14
nginx 0.6.14
*) Change: now by default the "echo" SSI command uses entity encoding.
*) Feature: the "encoding" parameter in the "echo" SSI command.
*) Feature: the "access_log" directive may be used inside the
"limit_except" block.
*) Bugfix: if all upstream servers were failed, then all servers had
got weight the was equal one until servers became alive; bug
appeared in 0.6.6.
*) Bugfix: a segmentation fault occurred in worker process if
$date_local and $date_gmt were used outside the
ngx_http_ssi_filter_module.
*) Bugfix: a segmentation fault might occur in worker process if debug
log was enabled.
Thanks to Andrei Nigmatulin.
*) Bugfix: ngx_http_memcached_module did not set
$upstream_response_time.
Thanks to Maxim Dounin.
*) Bugfix: a worker process may got caught in an endless loop, if the
memcached was used.
*) Bugfix: nginx supported low case only "close" and "keep-alive"
values in the "Connection" request header line; bug appeared in
0.6.11.
*) Bugfix: sub_filter did not work with empty substitution.
*) Bugfix: in sub_filter parsing.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 15 Oct 2007 00:00:00 +0400 |
parents | 1c519aff5c0c |
children | 4276c2f1f434 |
comparison
equal
deleted
inserted
replaced
339:d19550b67059 | 340:10cc350ed8a1 |
---|---|
1202 | 1202 |
1203 static ngx_int_t | 1203 static ngx_int_t |
1204 ngx_http_process_connection(ngx_http_request_t *r, ngx_table_elt_t *h, | 1204 ngx_http_process_connection(ngx_http_request_t *r, ngx_table_elt_t *h, |
1205 ngx_uint_t offset) | 1205 ngx_uint_t offset) |
1206 { | 1206 { |
1207 if (ngx_strstr(h->value.data, "close")) { | 1207 if (ngx_strcasestrn(h->value.data, "close", 5 - 1)) { |
1208 r->headers_in.connection_type = NGX_HTTP_CONNECTION_CLOSE; | 1208 r->headers_in.connection_type = NGX_HTTP_CONNECTION_CLOSE; |
1209 | 1209 |
1210 } else if (ngx_strstr(h->value.data, "keep-alive")) { | 1210 } else if (ngx_strcasestrn(h->value.data, "keep-alive", 10 - 1)) { |
1211 r->headers_in.connection_type = NGX_HTTP_CONNECTION_KEEP_ALIVE; | 1211 r->headers_in.connection_type = NGX_HTTP_CONNECTION_KEEP_ALIVE; |
1212 } | 1212 } |
1213 | 1213 |
1214 return NGX_OK; | 1214 return NGX_OK; |
1215 } | 1215 } |
1317 ngx_http_finalize_request(r, NGX_HTTP_NOT_ALLOWED); | 1317 ngx_http_finalize_request(r, NGX_HTTP_NOT_ALLOWED); |
1318 return NGX_ERROR; | 1318 return NGX_ERROR; |
1319 } | 1319 } |
1320 | 1320 |
1321 if (r->headers_in.transfer_encoding | 1321 if (r->headers_in.transfer_encoding |
1322 && ngx_strstr(r->headers_in.transfer_encoding->value.data, "chunked")) | 1322 && ngx_strcasestrn(r->headers_in.transfer_encoding->value.data, |
1323 "chunked", 7 - 1)) | |
1323 { | 1324 { |
1324 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, | 1325 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, |
1325 "client sent \"Transfer-Encoding: chunked\" header"); | 1326 "client sent \"Transfer-Encoding: chunked\" header"); |
1326 ngx_http_finalize_request(r, NGX_HTTP_LENGTH_REQUIRED); | 1327 ngx_http_finalize_request(r, NGX_HTTP_LENGTH_REQUIRED); |
1327 return NGX_ERROR; | 1328 return NGX_ERROR; |
1349 * in CPU cache | 1350 * in CPU cache |
1350 */ | 1351 */ |
1351 | 1352 |
1352 user_agent = r->headers_in.user_agent->value.data; | 1353 user_agent = r->headers_in.user_agent->value.data; |
1353 | 1354 |
1354 ua = (u_char *) ngx_strstr(user_agent, "MSIE"); | 1355 ua = ngx_strstrn(user_agent, "MSIE", 4 - 1); |
1355 | 1356 |
1356 if (ua && ua + 8 < user_agent + r->headers_in.user_agent->value.len) { | 1357 if (ua && ua + 8 < user_agent + r->headers_in.user_agent->value.len) { |
1357 | 1358 |
1358 r->headers_in.msie = 1; | 1359 r->headers_in.msie = 1; |
1359 | 1360 |
1367 c->ssl->no_send_shutdown = 1; | 1368 c->ssl->no_send_shutdown = 1; |
1368 } | 1369 } |
1369 #endif | 1370 #endif |
1370 } | 1371 } |
1371 | 1372 |
1372 if (ngx_strstr(user_agent, "Opera")) { | 1373 if (ngx_strstrn(user_agent, "Opera", 5 - 1)) { |
1373 r->headers_in.opera = 1; | 1374 r->headers_in.opera = 1; |
1374 r->headers_in.msie = 0; | 1375 r->headers_in.msie = 0; |
1375 r->headers_in.msie4 = 0; | 1376 r->headers_in.msie4 = 0; |
1376 } | 1377 } |
1377 | 1378 |
1378 if (!r->headers_in.msie && !r->headers_in.opera) { | 1379 if (!r->headers_in.msie && !r->headers_in.opera) { |
1379 | 1380 |
1380 if (ngx_strstr(user_agent, "Gecko/")) { | 1381 if (ngx_strstrn(user_agent, "Gecko/", 6 - 1)) { |
1381 r->headers_in.gecko = 1; | 1382 r->headers_in.gecko = 1; |
1382 | 1383 |
1383 } else if (ngx_strstr(user_agent, "Konqueror")) { | 1384 } else if (ngx_strstrn(user_agent, "Konqueror", 9 - 1)) { |
1384 r->headers_in.konqueror = 1; | 1385 r->headers_in.konqueror = 1; |
1385 } | 1386 } |
1386 } | 1387 } |
1387 } | 1388 } |
1388 | 1389 |