diff options
author | Igor Sysoev <igor@sysoev.ru> | 2005-09-30 14:41:25 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2005-09-30 14:41:25 +0000 |
commit | 9fa5a823c467c8ba13f8edff3c7d3c6dc75ea1d4 (patch) | |
tree | 7db278ad5da26db878ba05453ac96404fa2df556 /src/imap/ngx_imap_proxy_module.c | |
parent | bdf4a89a20b9b2cb91c7c97941a2cb36534e2f9d (diff) | |
download | nginx-9fa5a823c467c8ba13f8edff3c7d3c6dc75ea1d4.tar.gz nginx-9fa5a823c467c8ba13f8edff3c7d3c6dc75ea1d4.zip |
nginx-0.2.2-RELEASE importrelease-0.2.2
*) Feature: the "config errmsg" command of the ngx_http_ssi_module.
*) Change: the ngx_http_geo_module variables can be overridden by the
"set" directive.
*) Feature: the "ssl_protocols" and "ssl_prefer_server_ciphers"
directives of the ngx_http_ssl_module and ngx_imap_ssl_module.
*) Bugfix: the ngx_http_autoindex_module did not show correctly the
long file names;
*) Bugfix: the ngx_http_autoindex_module now do not show the files
starting by dot.
*) Bugfix: if the SSL handshake failed then another connection may be
closed too.
Thanks to Rob Mueller.
*) Bugfix: the export versions of MSIE 5.x could not connect via HTTPS.
Diffstat (limited to 'src/imap/ngx_imap_proxy_module.c')
-rw-r--r-- | src/imap/ngx_imap_proxy_module.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/imap/ngx_imap_proxy_module.c b/src/imap/ngx_imap_proxy_module.c index 86a4ff8a9..bfbcc1cbe 100644 --- a/src/imap/ngx_imap_proxy_module.c +++ b/src/imap/ngx_imap_proxy_module.c @@ -156,6 +156,7 @@ ngx_imap_proxy_block_read(ngx_event_t *rev) static void ngx_imap_proxy_imap_handler(ngx_event_t *rev) { + char *action; u_char *p; ngx_int_t rc; ngx_str_t line; @@ -293,6 +294,11 @@ ngx_imap_proxy_imap_handler(ngx_event_t *rev) ngx_add_timer(s->connection->read, pcf->timeout); ngx_del_timer(c->read); + action = c->log->action; + c->log->action = NULL; + ngx_log_error(NGX_LOG_INFO, c->log, 0, "client logged in"); + c->log->action = action; + c->log->action = "proxying"; } } @@ -301,6 +307,7 @@ ngx_imap_proxy_imap_handler(ngx_event_t *rev) static void ngx_imap_proxy_pop3_handler(ngx_event_t *rev) { + char *action; u_char *p; ngx_int_t rc; ngx_str_t line; @@ -418,6 +425,11 @@ ngx_imap_proxy_pop3_handler(ngx_event_t *rev) ngx_add_timer(s->connection->read, pcf->timeout); ngx_del_timer(c->read); + action = c->log->action; + c->log->action = NULL; + ngx_log_error(NGX_LOG_INFO, c->log, 0, "client logged in"); + c->log->action = action; + c->log->action = "proxying"; } } @@ -507,6 +519,7 @@ ngx_imap_proxy_read_response(ngx_imap_session_t *s, ngx_uint_t what) static void ngx_imap_proxy_handler(ngx_event_t *ev) { + char *action; size_t size; ssize_t n; ngx_buf_t *b; @@ -603,7 +616,17 @@ ngx_imap_proxy_handler(ngx_event_t *ev) if (size && src->read->ready) { n = src->recv(src, b->last, size); - if (n == NGX_ERROR || n == 0) { + if (n == NGX_ERROR) { + ngx_imap_proxy_close_session(s); + return; + } + + if (n == 0) { + action = c->log->action; + c->log->action = NULL; + ngx_log_error(NGX_LOG_INFO, c->log, 0, "proxied session done"); + c->log->action = action; + ngx_imap_proxy_close_session(s); return; } |