Mercurial > hg > nginx-quic
comparison src/event/ngx_event_openssl.c @ 597:9262f520ce21 release-0.3.20
nginx-0.3.20-RELEASE import
*) Bugfix: in SSI handling.
*) Bugfix: the ngx_http_memcached_module did not support the keys in
the "/usr?args" form.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 11 Jan 2006 15:26:57 +0000 |
parents | 8c0cdd81580e |
children | 3f8a2132b93d |
comparison
equal
deleted
inserted
replaced
596:0381e6d3aa70 | 597:9262f520ce21 |
---|---|
590 int n; | 590 int n; |
591 ngx_uint_t flush; | 591 ngx_uint_t flush; |
592 ssize_t send, size; | 592 ssize_t send, size; |
593 ngx_buf_t *buf; | 593 ngx_buf_t *buf; |
594 | 594 |
595 if (!c->ssl->buffer || (in && in->next == NULL && !c->buffered)) { | 595 if (!c->ssl->buffer |
596 || (in && in->next == NULL && !(c->buffered & NGX_SSL_BUFFERED))) | |
597 { | |
596 | 598 |
597 /* | 599 /* |
598 * we avoid a buffer copy if | 600 * we avoid a buffer copy if |
599 * we do not need to buffer the output | 601 * we do not need to buffer the output |
600 * or the incoming buf is a single and our buffer is empty | 602 * or the incoming buf is a single and our buffer is empty |
611 if (n == NGX_ERROR) { | 613 if (n == NGX_ERROR) { |
612 return NGX_CHAIN_ERROR; | 614 return NGX_CHAIN_ERROR; |
613 } | 615 } |
614 | 616 |
615 if (n == NGX_AGAIN) { | 617 if (n == NGX_AGAIN) { |
616 c->buffered = 1; | 618 c->buffered |= NGX_SSL_BUFFERED; |
617 return in; | 619 return in; |
618 } | 620 } |
619 | 621 |
620 in->buf->pos += n; | 622 in->buf->pos += n; |
621 | 623 |
687 if (n == NGX_ERROR) { | 689 if (n == NGX_ERROR) { |
688 return NGX_CHAIN_ERROR; | 690 return NGX_CHAIN_ERROR; |
689 } | 691 } |
690 | 692 |
691 if (n == NGX_AGAIN) { | 693 if (n == NGX_AGAIN) { |
692 c->buffered = 1; | 694 c->buffered |= NGX_SSL_BUFFERED; |
693 return in; | 695 return in; |
694 } | 696 } |
695 | 697 |
696 buf->pos += n; | 698 buf->pos += n; |
697 send += n; | 699 send += n; |
709 if (in == NULL || send == limit) { | 711 if (in == NULL || send == limit) { |
710 break; | 712 break; |
711 } | 713 } |
712 } | 714 } |
713 | 715 |
714 c->buffered = (buf->pos < buf->last) ? 1 : 0; | 716 if (buf->pos < buf->last) { |
717 c->buffered |= NGX_SSL_BUFFERED; | |
718 | |
719 } else { | |
720 c->buffered &= ~NGX_SSL_BUFFERED; | |
721 } | |
715 | 722 |
716 return in; | 723 return in; |
717 } | 724 } |
718 | 725 |
719 | 726 |