Mercurial > hg > nginx-vendor-current
comparison src/core/ngx_output_chain.c @ 390:0b6053502c55 NGINX_0_7_7
nginx 0.7.7
*) Change: now the EAGAIN error returned by connect() is not considered
as temporary error.
*) Change: now the $ssl_client_cert variable value is a certificate
with TAB character intended before each line except first one; an
unchanged certificate is available in the $ssl_client_raw_cert
variable.
*) Feature: the "ask" parameter in the "ssl_verify_client" directive.
*) Feature: byte-range processing improvements.
Thanks to Maxim Dounin.
*) Feature: the "directio" directive.
*) Feature: MacOSX 1.5 sendfile() support.
*) Bugfix: now in MacOSX and Cygwin locations are tested in case
insensitive mode; however, the compare is provided by single-byte
locales only.
*) Bugfix: mail proxy SSL connections hanged, if select, poll, or
/dev/poll methods were used.
*) Bugfix: UTF-8 encoding usage in the ngx_http_autoindex_module.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 30 Jul 2008 00:00:00 +0400 |
parents | 6639b93e81b2 |
children | 9d81578d04bb |
comparison
equal
deleted
inserted
replaced
389:930e48a26dde | 390:0b6053502c55 |
---|---|
30 { | 30 { |
31 off_t bsize; | 31 off_t bsize; |
32 size_t size; | 32 size_t size; |
33 ngx_int_t rc, last; | 33 ngx_int_t rc, last; |
34 ngx_uint_t recycled; | 34 ngx_uint_t recycled; |
35 ngx_buf_t *b; | |
35 ngx_chain_t *cl, *out, **last_out; | 36 ngx_chain_t *cl, *out, **last_out; |
36 | 37 |
37 if (ctx->in == NULL && ctx->busy == NULL) { | 38 if (ctx->in == NULL && ctx->busy == NULL) { |
38 | 39 |
39 /* | 40 /* |
159 size = (size_t) bsize; | 160 size = (size_t) bsize; |
160 recycled = 0; | 161 recycled = 0; |
161 } | 162 } |
162 } | 163 } |
163 | 164 |
164 ctx->buf = ngx_create_temp_buf(ctx->pool, size); | 165 b = ngx_calloc_buf(ctx->pool); |
165 if (ctx->buf == NULL) { | 166 if (b == NULL) { |
166 return NGX_ERROR; | 167 return NGX_ERROR; |
167 } | 168 } |
168 | 169 |
169 ctx->buf->tag = ctx->tag; | 170 /* |
170 ctx->buf->recycled = recycled; | 171 * allocate block aligned to a disk sector size |
172 * to enable O_DIRECT | |
173 */ | |
174 | |
175 b->start = ngx_pmemalign(ctx->pool, size, 512); | |
176 if (b->start == NULL) { | |
177 return NGX_ERROR; | |
178 } | |
179 | |
180 b->pos = b->start; | |
181 b->last = b->start; | |
182 b->end = b->last + size; | |
183 b->temporary = 1; | |
184 b->tag = ctx->tag; | |
185 b->recycled = recycled; | |
186 | |
187 ctx->buf = b; | |
171 ctx->allocated++; | 188 ctx->allocated++; |
172 } | 189 } |
173 } | 190 } |
174 | 191 |
175 rc = ngx_output_chain_copy_buf(ctx->buf, ctx->in->buf, | 192 rc = ngx_output_chain_copy_buf(ctx->buf, ctx->in->buf, |