Mercurial > hg > nginx
comparison src/os/unix/ngx_readv_chain.c @ 455:295d97d70c69 release-0.1.2
nginx-0.1.2-RELEASE import
*) Feature: the --user=USER, --group=GROUP, and --with-ld-opt=OPTIONS
options in configure.
*) Feature: the server_name directive supports *.domain.tld.
*) Bugfix: the portability improvements.
*) Bugfix: if configuration file was set in command line, the
reconfiguration was impossible; the bug had appeared in 0.1.1.
*) Bugfix: proxy module may get caught in an endless loop when sendfile
is not used.
*) Bugfix: with sendfile the response was not recoded according to the
charset module directives; the bug had appeared in 0.1.1.
*) Bugfix: very seldom bug in the kqueue processing.
*) Bugfix: the gzip module compressed the proxied responses that was
already compressed.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 21 Oct 2004 15:34:38 +0000 |
parents | 42d11f017717 |
children | 2ff194b74f1e |
comparison
equal
deleted
inserted
replaced
454:2ff9cff0f469 | 455:295d97d70c69 |
---|---|
20 ngx_event_t *rev; | 20 ngx_event_t *rev; |
21 struct iovec *iov; | 21 struct iovec *iov; |
22 | 22 |
23 rev = c->read; | 23 rev = c->read; |
24 | 24 |
25 if (ngx_event_flags & NGX_HAVE_KQUEUE_EVENT) { | 25 if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) { |
26 ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0, | 26 ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0, |
27 "readv: eof:%d, avail:%d, err:%d", | 27 "readv: eof:%d, avail:%d, err:%d", |
28 rev->pending_eof, rev->available, rev->kq_errno); | 28 rev->pending_eof, rev->available, rev->kq_errno); |
29 | 29 |
30 if (rev->available == 0) { | 30 if (rev->available == 0) { |
79 | 79 |
80 do { | 80 do { |
81 n = readv(c->fd, (struct iovec *) io.elts, io.nelts); | 81 n = readv(c->fd, (struct iovec *) io.elts, io.nelts); |
82 | 82 |
83 if (n >= 0) { | 83 if (n >= 0) { |
84 if (ngx_event_flags & NGX_HAVE_KQUEUE_EVENT) { | 84 if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) { |
85 rev->available -= n; | 85 rev->available -= n; |
86 | 86 |
87 /* | 87 /* |
88 * rev->available can be negative here because some additional | 88 * rev->available can be negative here because some additional |
89 * bytes can be received between kevent() and recv() | 89 * bytes can be received between kevent() and recv() |
184 | 184 |
185 return n; | 185 return n; |
186 | 186 |
187 } else if (n > 0) { | 187 } else if (n > 0) { |
188 | 188 |
189 if (n < size && !(ngx_event_flags & NGX_HAVE_GREEDY_EVENT)) { | 189 if (n < size && !(ngx_event_flags & NGX_USE_GREEDY_EVENT)) { |
190 rev->ready = 0; | 190 rev->ready = 0; |
191 } | 191 } |
192 | 192 |
193 return n; | 193 return n; |
194 } | 194 } |