Mercurial > hg > nginx-vendor-current
comparison src/os/unix/ngx_linux_sendfile_chain.c @ 32:da8c190bdaba NGINX_0_1_16
nginx 0.1.16
*) Bugfix: if the response were transferred by chunks, then on the HEAD
request the final chunk was issued.
*) Bugfix: the "Connection: keep-alive" header were issued, even if the
keepalive_timeout directive forbade the keep-alive use.
*) Bugfix: the errors in the ngx_http_fastcgi_module caused the
segmentation faults.
*) Bugfix: the compressed response encrypted by SSL may not transferred
complete.
*) Bugfix: the TCP-specific TCP_NODELAY, TCP_NOPSUH, and TCP_CORK
options, are not used for the unix domain sockets.
*) Feature: the rewrite directive supports the arguments rewriting.
*) Bugfix: the response code 400 was returned for the POST request with
the "Content-Length: 0" header; bug appeared in 0.1.14.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 25 Jan 2005 00:00:00 +0300 |
parents | 7ca9bdc82b3f |
children | 2879cd3a40cb |
comparison
equal
deleted
inserted
replaced
31:1b17dd824438 | 32:da8c190bdaba |
---|---|
87 } | 87 } |
88 | 88 |
89 #if 1 | 89 #if 1 |
90 if (!ngx_buf_in_memory(cl->buf) && !cl->buf->in_file) { | 90 if (!ngx_buf_in_memory(cl->buf) && !cl->buf->in_file) { |
91 ngx_log_error(NGX_LOG_ALERT, c->log, 0, | 91 ngx_log_error(NGX_LOG_ALERT, c->log, 0, |
92 "zero size buf in sendfile"); | 92 "zero size buf in sendfile " |
93 "t:%d r:%d f:%d %p %p-%p %p %O-%O", | |
94 cl->buf->temporary, | |
95 cl->buf->recycled, | |
96 cl->buf->in_file, | |
97 cl->buf->start, | |
98 cl->buf->pos, | |
99 cl->buf->last, | |
100 cl->buf->file, | |
101 cl->buf->file_pos, | |
102 cl->buf->file_last); | |
103 | |
93 ngx_debug_point(); | 104 ngx_debug_point(); |
94 } | 105 } |
95 #endif | 106 #endif |
96 | 107 |
97 if (!ngx_buf_in_memory_only(cl->buf)) { | 108 if (!ngx_buf_in_memory_only(cl->buf)) { |
127 && cl | 138 && cl |
128 && cl->buf->in_file) | 139 && cl->buf->in_file) |
129 { | 140 { |
130 /* the TCP_CORK and TCP_NODELAY are mutually exclusive */ | 141 /* the TCP_CORK and TCP_NODELAY are mutually exclusive */ |
131 | 142 |
132 if (c->tcp_nodelay) { | 143 if (c->tcp_nodelay == NGX_TCP_NODELAY_SET) { |
133 | 144 |
134 tcp_nodelay = 0; | 145 tcp_nodelay = 0; |
135 | 146 |
136 if (setsockopt(c->fd, IPPROTO_TCP, TCP_NODELAY, | 147 if (setsockopt(c->fd, IPPROTO_TCP, TCP_NODELAY, |
137 (const void *) &tcp_nodelay, sizeof(int)) == -1) | 148 (const void *) &tcp_nodelay, sizeof(int)) == -1) |
144 * and without the TCP_CORK | 155 * and without the TCP_CORK |
145 */ | 156 */ |
146 | 157 |
147 if (err != NGX_EINTR) { | 158 if (err != NGX_EINTR) { |
148 wev->error = 1; | 159 wev->error = 1; |
149 ngx_connection_error(c, ngx_socket_errno, | 160 ngx_connection_error(c, err, |
150 "setsockopt(TCP_NODELAY) failed"); | 161 "setsockopt(TCP_NODELAY) failed"); |
151 return NGX_CHAIN_ERROR; | 162 return NGX_CHAIN_ERROR; |
152 } | 163 } |
153 | 164 |
154 } else { | 165 } else { |
155 c->tcp_nodelay = 0; | 166 c->tcp_nodelay = NGX_TCP_NODELAY_UNSET; |
156 | 167 |
157 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, | 168 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, |
158 "no tcp_nodelay"); | 169 "no tcp_nodelay"); |
159 } | 170 } |
160 } | 171 } |
161 | 172 |
162 if (!c->tcp_nodelay) { | 173 if (c->tcp_nodelay == NGX_TCP_NODELAY_UNSET) { |
163 | 174 |
164 if (ngx_tcp_nopush(c->fd) == NGX_ERROR) { | 175 if (ngx_tcp_nopush(c->fd) == NGX_ERROR) { |
165 err = ngx_errno; | 176 err = ngx_errno; |
166 | 177 |
167 /* | 178 /* |