Mercurial > hg > nginx-vendor-0-7
comparison src/imap/ngx_imap_auth_http_module.c @ 92:45945fa8b8ba NGINX_0_2_0
nginx 0.2.0
*) The pid-file names used during online upgrade was changed and now is
not required a manual rename operation. The old master process adds
the ".oldbin" suffix to its pid-file and executes a new binary file.
The new master process creates usual pid-file without the ".newbin"
suffix. If the master process exits, then old master process renames
back its pid-file with the ".oldbin" suffix to the pid-file without
suffix.
*) Change: the "worker_connections" directive, new name of the
"connections" directive; now the directive specifies maximum number
of connections, but not maximum socket descriptor number.
*) Feature: SSL supports the session cache inside one worker process.
*) Feature: the "satisfy_any" directive.
*) Change: the ngx_http_access_module and ngx_http_auth_basic_module do
not run for subrequests.
*) Feature: the "worker_rlimit_nofile" and "worker_rlimit_sigpending"
directives.
*) Bugfix: if all backend using in load-balancing failed after one
error, then nginx did not try do connect to them during 60 seconds.
*) Bugfix: in IMAP/POP3 command argument parsing.
Thanks to Rob Mueller.
*) Bugfix: errors while using SSL in IMAP/POP3 proxy.
*) Bugfix: errors while using SSI and gzipping.
*) Bugfix: the "Expires" and "Cache-Control" header lines were omitted
from the 304 responses.
Thanks to Alexandr Kukushkin.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Fri, 23 Sep 2005 00:00:00 +0400 |
parents | 71c46860eb55 |
children | ca4f70b3ccc6 |
comparison
equal
deleted
inserted
replaced
91:c3eee83ea942 | 92:45945fa8b8ba |
---|---|
148 ctx->peer.log = s->connection->log; | 148 ctx->peer.log = s->connection->log; |
149 ctx->peer.log_error = NGX_ERROR_ERR; | 149 ctx->peer.log_error = NGX_ERROR_ERR; |
150 | 150 |
151 rc = ngx_event_connect_peer(&ctx->peer); | 151 rc = ngx_event_connect_peer(&ctx->peer); |
152 | 152 |
153 if (rc == NGX_ERROR || rc == NGX_CONNECT_ERROR) { | 153 if (rc == NGX_ERROR || rc == NGX_BUSY || rc == NGX_DECLINED) { |
154 ngx_close_connection(ctx->peer.connection); | |
154 ngx_imap_session_internal_server_error(s); | 155 ngx_imap_session_internal_server_error(s); |
155 return; | 156 return; |
156 } | 157 } |
157 | 158 |
158 ctx->peer.connection->data = s; | 159 ctx->peer.connection->data = s; |
446 + sizeof(CRLF) - 1; | 447 + sizeof(CRLF) - 1; |
447 } | 448 } |
448 | 449 |
449 p = ngx_pcalloc(s->connection->pool, size); | 450 p = ngx_pcalloc(s->connection->pool, size); |
450 if (p == NULL) { | 451 if (p == NULL) { |
452 ngx_close_connection(ctx->peer.connection); | |
451 ngx_imap_session_internal_server_error(s); | 453 ngx_imap_session_internal_server_error(s); |
452 return; | 454 return; |
453 } | 455 } |
454 | 456 |
455 ctx->err.data = p; | 457 ctx->err.data = p; |
639 | 641 |
640 | 642 |
641 static void | 643 static void |
642 ngx_imap_auth_sleep_handler(ngx_event_t *rev) | 644 ngx_imap_auth_sleep_handler(ngx_event_t *rev) |
643 { | 645 { |
644 ngx_connection_t *c; | 646 ngx_connection_t *c; |
645 ngx_imap_session_t *s; | 647 ngx_imap_session_t *s; |
648 ngx_imap_core_srv_conf_t *cscf; | |
646 | 649 |
647 ngx_log_debug0(NGX_LOG_DEBUG_IMAP, rev->log, 0, "imap auth sleep handler"); | 650 ngx_log_debug0(NGX_LOG_DEBUG_IMAP, rev->log, 0, "imap auth sleep handler"); |
648 | 651 |
649 c = rev->data; | 652 c = rev->data; |
650 s = c->data; | 653 s = c->data; |
660 } else { | 663 } else { |
661 s->imap_state = ngx_imap_start; | 664 s->imap_state = ngx_imap_start; |
662 s->connection->read->handler = ngx_imap_auth_state; | 665 s->connection->read->handler = ngx_imap_auth_state; |
663 } | 666 } |
664 | 667 |
668 c->log->action = "in auth state"; | |
669 | |
670 ngx_imap_send(s->connection->write); | |
671 | |
672 if (c->closed) { | |
673 return; | |
674 } | |
675 | |
676 cscf = ngx_imap_get_module_srv_conf(s, ngx_imap_core_module); | |
677 | |
678 ngx_add_timer(rev, cscf->timeout); | |
679 | |
665 if (rev->ready) { | 680 if (rev->ready) { |
666 s->connection->read->handler(rev); | 681 s->connection->read->handler(rev); |
667 return; | 682 return; |
668 } | 683 } |
669 | 684 |
670 if (ngx_handle_read_event(rev, 0) == NGX_ERROR) { | 685 if (ngx_handle_read_event(rev, 0) == NGX_ERROR) { |
671 ngx_imap_close_connection(s->connection); | 686 ngx_imap_close_connection(s->connection); |
672 } | 687 } |
673 | |
674 ngx_imap_send(s->connection->write); | |
675 | 688 |
676 return; | 689 return; |
677 } | 690 } |
678 | 691 |
679 if (rev->active) { | 692 if (rev->active) { |