From 7f7846d8208c9179b7632eddc4a3165b3b10afbb Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Wed, 26 Apr 2006 09:52:47 +0000 Subject: nginx-0.3.42-RELEASE import *) Feature: the "bind" option of the "listen" directive in IMAP/POP3 proxy. *) Bugfix: if the same capture in the "rewrite" directive was used more then once. *) Bugfix: the $sent_http_content_type, $sent_http_content_length, $sent_http_last_modified, $sent_http_connection, $sent_http_keep_alive, and $sent_http_transfer_encoding variables were not written to access log. *) Bugfix: the $sent_http_cache_control returned value of the single "Cache-Control" response header line. --- src/http/ngx_http_request.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/http/ngx_http_request.c') diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 615ae7511..d801e2ce5 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -201,11 +201,11 @@ ngx_http_init_connection(ngx_connection_t *c) } -static -void ngx_http_init_request(ngx_event_t *rev) +static void +ngx_http_init_request(ngx_event_t *rev) { - ngx_uint_t i; socklen_t len; + ngx_uint_t i; struct sockaddr_in sin; ngx_connection_t *c; ngx_http_request_t *r; @@ -274,7 +274,7 @@ void ngx_http_init_request(ngx_event_t *rev) /* AF_INET only */ - hip = c->servers; + hip = c->listening->servers; hia = hip->addrs; r->port = hip->port; @@ -311,7 +311,7 @@ void ngx_http_init_request(ngx_event_t *rev) r->in_addr = sin.sin_addr.s_addr; } - /* the last in_port->addrs address is "*" */ + /* the last address is "*" */ for ( /* void */ ; i < hip->naddrs - 1; i++) { if (hia[i].addr == r->in_addr) { @@ -1405,6 +1405,12 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc) || rc == NGX_HTTP_REQUEST_TIME_OUT || r->connection->error) { + if (rc == NGX_HTTP_CLIENT_CLOSED_REQUEST + && r->headers_out.status == 0) + { + r->headers_out.status = NGX_HTTP_CLIENT_CLOSED_REQUEST; + } + if (ngx_http_post_action(r) == NGX_OK) { return; } -- cgit