Mercurial > hg > nginx-ranges
comparison 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 |
comparison
equal
deleted
inserted
replaced
131:add6b1e86d38 | 132:91372f004adf |
---|---|
299 d++; | 299 d++; |
300 } | 300 } |
301 | 301 |
302 *d = '\0'; | 302 *d = '\0'; |
303 | 303 |
304 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, | 304 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0, |
305 "SSL: %s, cipher: \"%s\"", | 305 "SSL: %s, cipher: \"%s\"", |
306 SSL_get_version(c->ssl->connection), &buf[1]); | 306 SSL_get_version(c->ssl->connection), &buf[1]); |
307 | 307 |
308 if (SSL_session_reused(c->ssl->connection)) { | 308 if (SSL_session_reused(c->ssl->connection)) { |
309 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, | 309 ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0, |
310 "SSL reused session"); | 310 "SSL reused session"); |
311 } | 311 } |
312 | 312 |
313 } else { | 313 } else { |
314 ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0, | 314 ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0, |
628 flush = (in == NULL) ? 1 : 0; | 628 flush = (in == NULL) ? 1 : 0; |
629 | 629 |
630 for ( ;; ) { | 630 for ( ;; ) { |
631 | 631 |
632 while (in && buf->last < buf->end) { | 632 while (in && buf->last < buf->end) { |
633 if (in->buf->last_buf) { | 633 if (in->buf->last_buf || in->buf->flush) { |
634 flush = 1; | 634 flush = 1; |
635 } | 635 } |
636 | 636 |
637 if (ngx_buf_special(in->buf)) { | 637 if (ngx_buf_special(in->buf)) { |
638 in = in->next; | 638 in = in->next; |
642 size = in->buf->last - in->buf->pos; | 642 size = in->buf->last - in->buf->pos; |
643 | 643 |
644 if (size > buf->end - buf->last) { | 644 if (size > buf->end - buf->last) { |
645 size = buf->end - buf->last; | 645 size = buf->end - buf->last; |
646 } | 646 } |
647 | |
648 /* | |
649 * TODO: the taking in->buf->flush into account can be | |
650 * implemented using the limit on the higher level | |
651 */ | |
652 | 647 |
653 if (send + size > limit) { | 648 if (send + size > limit) { |
654 size = (ssize_t) (limit - send); | 649 size = (ssize_t) (limit - send); |
655 flush = 1; | 650 flush = 1; |
656 } | 651 } |
941 | 936 |
942 ngx_ssl_error(level, c->log, err, text); | 937 ngx_ssl_error(level, c->log, err, text); |
943 } | 938 } |
944 | 939 |
945 | 940 |
946 void | 941 void ngx_cdecl |
947 ngx_ssl_error(ngx_uint_t level, ngx_log_t *log, ngx_err_t err, char *fmt, ...) | 942 ngx_ssl_error(ngx_uint_t level, ngx_log_t *log, ngx_err_t err, char *fmt, ...) |
948 { | 943 { |
949 u_long n; | 944 u_long n; |
950 va_list args; | 945 va_list args; |
951 u_char errstr[NGX_MAX_CONF_ERRSTR], *p, *last; | 946 u_char errstr[NGX_MAX_CONF_ERRSTR], *p, *last; |
956 p = ngx_vsnprintf(errstr, sizeof(errstr) - 1, fmt, args); | 951 p = ngx_vsnprintf(errstr, sizeof(errstr) - 1, fmt, args); |
957 va_end(args); | 952 va_end(args); |
958 | 953 |
959 p = ngx_cpystrn(p, (u_char *) " (SSL:", last - p); | 954 p = ngx_cpystrn(p, (u_char *) " (SSL:", last - p); |
960 | 955 |
961 while (p < last && (n = ERR_get_error())) { | 956 while (p < last) { |
957 | |
958 n = ERR_get_error(); | |
959 | |
960 if (n == 0) { | |
961 break; | |
962 } | |
962 | 963 |
963 *p++ = ' '; | 964 *p++ = ' '; |
964 | 965 |
965 ERR_error_string_n(n, (char *) p, last - p); | 966 ERR_error_string_n(n, (char *) p, last - p); |
966 | 967 |