Mercurial > hg > nginx-vendor-0-5
comparison src/http/ngx_http_request.c @ 80:6ae11d59d10e NGINX_0_1_40
nginx 0.1.40
*) Bugfix: if a client sent too long header line, then the request
information did not logged in the error log.
*) Bugfix: the "Set-Cookie" header line was not transferred when the
"X-Accel-Redirect" was used; bug appeared in 0.1.39.
*) Bugfix: the "Content-Disposition" header line was not transferred
when the "X-Accel-Redirect" was used.
*) Bugfix: the master process did not close the listen socket on the
SIGQUIT signal.
*) Bugfix: after on-line upgrade on Linux and Solaris the process name
became shorter in the "ps" command.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Fri, 22 Jul 2005 00:00:00 +0400 |
parents | da9a3b14312d |
children | 991c6e4c7654 |
comparison
equal
deleted
inserted
replaced
79:b7cf468d0667 | 80:6ae11d59d10e |
---|---|
41 | 41 |
42 static void ngx_http_set_keepalive(ngx_http_request_t *r); | 42 static void ngx_http_set_keepalive(ngx_http_request_t *r); |
43 static void ngx_http_keepalive_handler(ngx_event_t *ev); | 43 static void ngx_http_keepalive_handler(ngx_event_t *ev); |
44 static void ngx_http_set_lingering_close(ngx_http_request_t *r); | 44 static void ngx_http_set_lingering_close(ngx_http_request_t *r); |
45 static void ngx_http_lingering_close_handler(ngx_event_t *ev); | 45 static void ngx_http_lingering_close_handler(ngx_event_t *ev); |
46 static void ngx_http_close_request(ngx_http_request_t *r, ngx_int_t error); | |
47 static void ngx_http_close_connection(ngx_connection_t *c); | |
46 | 48 |
47 static u_char *ngx_http_log_error(ngx_log_t *log, u_char *buf, size_t len); | 49 static u_char *ngx_http_log_error(ngx_log_t *log, u_char *buf, size_t len); |
48 static u_char *ngx_http_log_error_handler(ngx_http_request_t *r, u_char *buf, | 50 static u_char *ngx_http_log_error_handler(ngx_http_request_t *r, u_char *buf, |
49 size_t len); | 51 size_t len); |
50 | 52 |
754 } | 756 } |
755 | 757 |
756 if (rv == NGX_DECLINED) { | 758 if (rv == NGX_DECLINED) { |
757 header.len = r->header_in->end - r->header_name_start; | 759 header.len = r->header_in->end - r->header_name_start; |
758 header.data = r->header_name_start; | 760 header.data = r->header_name_start; |
761 | |
762 if (header.len > NGX_MAX_ERROR_STR - 300) { | |
763 header.len = NGX_MAX_ERROR_STR - 300; | |
764 header.data[header.len++] = '.'; | |
765 header.data[header.len++] = '.'; | |
766 header.data[header.len++] = '.'; | |
767 } | |
768 | |
759 ngx_log_error(NGX_LOG_INFO, c->log, 0, | 769 ngx_log_error(NGX_LOG_INFO, c->log, 0, |
760 "client sent too long header line: \"%V\"", | 770 "client sent too long header line: \"%V\"", |
761 &header); | 771 &header); |
762 ngx_http_close_request(r, NGX_HTTP_BAD_REQUEST); | 772 ngx_http_close_request(r, NGX_HTTP_BAD_REQUEST); |
763 ngx_http_close_connection(c); | 773 ngx_http_close_connection(c); |
2338 log = r->connection->log; | 2348 log = r->connection->log; |
2339 | 2349 |
2340 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, log, 0, "http close request"); | 2350 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, log, 0, "http close request"); |
2341 | 2351 |
2342 if (r->pool == NULL) { | 2352 if (r->pool == NULL) { |
2343 ngx_log_error(NGX_LOG_ALERT, log, 0, | 2353 ngx_log_error(NGX_LOG_ALERT, log, 0, "http request already closed"); |
2344 "http request already closed"); | |
2345 return; | 2354 return; |
2346 } | 2355 } |
2347 | 2356 |
2348 #if (NGX_STAT_STUB) | 2357 #if (NGX_STAT_STUB) |
2349 if (r->stat_reading) { | 2358 if (r->stat_reading) { |
2387 } | 2396 } |
2388 | 2397 |
2389 | 2398 |
2390 #if (NGX_HTTP_SSL) | 2399 #if (NGX_HTTP_SSL) |
2391 | 2400 |
2392 void | 2401 static void |
2393 ngx_ssl_close_handler(ngx_event_t *ev) | 2402 ngx_http_ssl_close_handler(ngx_event_t *ev) |
2394 { | 2403 { |
2395 ngx_connection_t *c; | 2404 ngx_connection_t *c; |
2396 | 2405 |
2397 c = ev->data; | 2406 c = ev->data; |
2398 | 2407 |
2406 } | 2415 } |
2407 | 2416 |
2408 #endif | 2417 #endif |
2409 | 2418 |
2410 | 2419 |
2411 void | 2420 static void |
2412 ngx_http_close_connection(ngx_connection_t *c) | 2421 ngx_http_close_connection(ngx_connection_t *c) |
2413 { | 2422 { |
2414 ngx_pool_t *pool; | 2423 ngx_pool_t *pool; |
2415 | 2424 |
2416 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, | 2425 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, |
2418 | 2427 |
2419 #if (NGX_OPENSSL) | 2428 #if (NGX_OPENSSL) |
2420 | 2429 |
2421 if (c->ssl) { | 2430 if (c->ssl) { |
2422 if (ngx_ssl_shutdown(c) == NGX_AGAIN) { | 2431 if (ngx_ssl_shutdown(c) == NGX_AGAIN) { |
2423 c->read->handler = ngx_ssl_close_handler; | 2432 c->read->handler = ngx_http_ssl_close_handler; |
2424 c->write->handler = ngx_ssl_close_handler; | 2433 c->write->handler = ngx_http_ssl_close_handler; |
2425 return; | 2434 return; |
2426 } | 2435 } |
2427 } | 2436 } |
2428 | 2437 |
2429 #endif | 2438 #endif |