Mercurial > hg > nginx-mail
diff src/event/ngx_event_openssl.c @ 132:91372f004adf NGINX_0_3_13
nginx 0.3.13
*) Feature: the IMAP/POP3 proxy supports STARTTLS and STLS.
*) Bugfix: the IMAP/POP3 proxy did not work with the select, poll, and
/dev/poll methods.
*) Bugfix: in SSI handling.
*) Bugfix: now Solaris sendfilev() is not used to transfer the client
request body to FastCGI-server via the unix domain socket.
*) Bugfix: the "auth_basic" directive did not disable the
authorization; bug appeared in 0.3.11.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 05 Dec 2005 00:00:00 +0300 |
parents | df17fbafec8f |
children | 8e6d4d96ec4c |
line wrap: on
line diff
--- a/src/event/ngx_event_openssl.c +++ b/src/event/ngx_event_openssl.c @@ -301,12 +301,12 @@ ngx_ssl_handshake(ngx_connection_t *c) *d = '\0'; - ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, + ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0, "SSL: %s, cipher: \"%s\"", SSL_get_version(c->ssl->connection), &buf[1]); if (SSL_session_reused(c->ssl->connection)) { - ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, + ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0, "SSL reused session"); } @@ -630,7 +630,7 @@ ngx_ssl_send_chain(ngx_connection_t *c, for ( ;; ) { while (in && buf->last < buf->end) { - if (in->buf->last_buf) { + if (in->buf->last_buf || in->buf->flush) { flush = 1; } @@ -645,11 +645,6 @@ ngx_ssl_send_chain(ngx_connection_t *c, size = buf->end - buf->last; } - /* - * TODO: the taking in->buf->flush into account can be - * implemented using the limit on the higher level - */ - if (send + size > limit) { size = (ssize_t) (limit - send); flush = 1; @@ -943,7 +938,7 @@ ngx_ssl_connection_error(ngx_connection_ } -void +void ngx_cdecl ngx_ssl_error(ngx_uint_t level, ngx_log_t *log, ngx_err_t err, char *fmt, ...) { u_long n; @@ -958,7 +953,13 @@ ngx_ssl_error(ngx_uint_t level, ngx_log_ p = ngx_cpystrn(p, (u_char *) " (SSL:", last - p); - while (p < last && (n = ERR_get_error())) { + while (p < last) { + + n = ERR_get_error(); + + if (n == 0) { + break; + } *p++ = ' ';