Mercurial > hg > nginx-vendor-current
comparison src/os/unix/ngx_linux_sendfile_chain.c @ 28:7ca9bdc82b3f NGINX_0_1_14
nginx 0.1.14
*) Feature: the autoconfiguration directives:
--http-client-body-temp-path=PATH, --http-proxy-temp-path=PATH, and
--http-fastcgi-temp-path=PATH
*) Change: the directory name for the temporary files with the client
request body is specified by directive client_body_temp_path, by
default it is <prefix>/client_body_temp.
*) Feature: the ngx_http_fastcgi_module and the directives:
fastcgi_pass, fastcgi_root, fastcgi_index, fastcgi_params,
fastcgi_connect_timeout, fastcgi_send_timeout, fastcgi_read_timeout,
fastcgi_send_lowat, fastcgi_header_buffer_size, fastcgi_buffers,
fastcgi_busy_buffers_size, fastcgi_temp_path,
fastcgi_max_temp_file_size, fastcgi_temp_file_write_size,
fastcgi_next_upstream, and fastcgi_x_powered_by.
*) Bugfix: the "[alert] zero size buf" error; bug appeared in 0.1.3.
*) Change: the URI must be specified after the host name in the
proxy_pass directive.
*) Change: the %3F symbol in the URI was considered as the argument
string start.
*) Feature: the unix domain sockets support in the
ngx_http_proxy_module.
*) Feature: the ssl_engine and ssl_ciphers directives.
Thanks to Sergey Skvortsov for SSL-accelerator.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 18 Jan 2005 00:00:00 +0300 |
parents | 45fe5b98a9de |
children | da8c190bdaba |
comparison
equal
deleted
inserted
replaced
27:66901c2556fd | 28:7ca9bdc82b3f |
---|---|
9 #include <ngx_event.h> | 9 #include <ngx_event.h> |
10 | 10 |
11 | 11 |
12 /* | 12 /* |
13 * On Linux up to 2.4.21 sendfile() (syscall #187) works with 32-bit | 13 * On Linux up to 2.4.21 sendfile() (syscall #187) works with 32-bit |
14 * offsets only and the including <sys/sendfile.h> breaks the compiling | 14 * offsets only, and the including <sys/sendfile.h> breaks the compiling, |
15 * if off_t is 64 bit wide. So we use own sendfile() definition where offset | 15 * if off_t is 64 bit wide. So we use own sendfile() definition, where offset |
16 * parameter is int32_t and use sendfile() for the file parts below 2G only. | 16 * parameter is int32_t, and use sendfile() for the file parts below 2G only, |
17 * see src/os/unix/ngx_linux_config.h | |
17 * | 18 * |
18 * Linux 2.4.21 has a new sendfile64() syscall #239. | 19 * Linux 2.4.21 has a new sendfile64() syscall #239. |
19 */ | 20 */ |
20 | 21 |
21 | 22 |
83 { | 84 { |
84 if (ngx_buf_special(cl->buf)) { | 85 if (ngx_buf_special(cl->buf)) { |
85 continue; | 86 continue; |
86 } | 87 } |
87 | 88 |
89 #if 1 | |
90 if (!ngx_buf_in_memory(cl->buf) && !cl->buf->in_file) { | |
91 ngx_log_error(NGX_LOG_ALERT, c->log, 0, | |
92 "zero size buf in sendfile"); | |
93 ngx_debug_point(); | |
94 } | |
95 #endif | |
96 | |
88 if (!ngx_buf_in_memory_only(cl->buf)) { | 97 if (!ngx_buf_in_memory_only(cl->buf)) { |
89 break; | 98 break; |
90 } | 99 } |
91 | 100 |
92 size = cl->buf->last - cl->buf->pos; | 101 size = cl->buf->last - cl->buf->pos; |
116 if (c->tcp_nopush == NGX_TCP_NOPUSH_UNSET | 125 if (c->tcp_nopush == NGX_TCP_NOPUSH_UNSET |
117 && header.nelts != 0 | 126 && header.nelts != 0 |
118 && cl | 127 && cl |
119 && cl->buf->in_file) | 128 && cl->buf->in_file) |
120 { | 129 { |
121 | |
122 /* the TCP_CORK and TCP_NODELAY are mutually exclusive */ | 130 /* the TCP_CORK and TCP_NODELAY are mutually exclusive */ |
123 | 131 |
124 if (c->tcp_nodelay) { | 132 if (c->tcp_nodelay) { |
125 | 133 |
126 tcp_nodelay = 0; | 134 tcp_nodelay = 0; |
129 (const void *) &tcp_nodelay, sizeof(int)) == -1) | 137 (const void *) &tcp_nodelay, sizeof(int)) == -1) |
130 { | 138 { |
131 err = ngx_errno; | 139 err = ngx_errno; |
132 | 140 |
133 /* | 141 /* |
134 * there is a tiny chance to be interrupted, however | 142 * there is a tiny chance to be interrupted, however, |
135 * we continue a processing with the TCP_NODELAY | 143 * we continue a processing with the TCP_NODELAY |
136 * and without the TCP_CORK | 144 * and without the TCP_CORK |
137 */ | 145 */ |
138 | 146 |
139 if (err != NGX_EINTR) { | 147 if (err != NGX_EINTR) { |
155 | 163 |
156 if (ngx_tcp_nopush(c->fd) == NGX_ERROR) { | 164 if (ngx_tcp_nopush(c->fd) == NGX_ERROR) { |
157 err = ngx_errno; | 165 err = ngx_errno; |
158 | 166 |
159 /* | 167 /* |
160 * there is a tiny chance to be interrupted, however | 168 * there is a tiny chance to be interrupted, however, |
161 * we continue a processing without the TCP_CORK | 169 * we continue a processing without the TCP_CORK |
162 */ | 170 */ |
163 | 171 |
164 if (err != NGX_EINTR) { | 172 if (err != NGX_EINTR) { |
165 wev->error = 1; | 173 wev->error = 1; |