comparison src/core/ngx_buf.h @ 48:6cfc63e68377 NGINX_0_1_24

nginx 0.1.24 *) Feature: the ngx_http_ssi_filter_module supports the QUERY_STRING and DOCUMENT_URI variables. *) Bugfix: the ngx_http_autoindex_module may some times return the 404 response for existent directory, if this directory was used in "alias" directive. *) Bugfix: the ngx_http_ssi_filter_module ran incorrectly for large responses. *) Bugfix: the lack of the "Referer" header line was always accounted as valid referrer.
author Igor Sysoev <http://sysoev.ru>
date Fri, 04 Mar 2005 00:00:00 +0300
parents 7ca9bdc82b3f
children 72eb30262aac
comparison
equal deleted inserted replaced
47:4ae32548452c 48:6cfc63e68377
104 104
105 105
106 #define ngx_buf_in_memory(b) (b->temporary || b->memory || b->mmap) 106 #define ngx_buf_in_memory(b) (b->temporary || b->memory || b->mmap)
107 #define ngx_buf_in_memory_only(b) (ngx_buf_in_memory(b) && !b->in_file) 107 #define ngx_buf_in_memory_only(b) (ngx_buf_in_memory(b) && !b->in_file)
108 #define ngx_buf_special(b) \ 108 #define ngx_buf_special(b) \
109 ((b->flush || b->last_buf) && !ngx_buf_in_memory(b) && !b->in_file) 109 ((b->flush || b->last_buf) && !ngx_buf_in_memory(b) && !b->in_file)
110 110
111 #define ngx_buf_size(b) \ 111 #define ngx_buf_size(b) \
112 (ngx_buf_in_memory(b) ? (off_t) (b->last - b->pos): \ 112 (ngx_buf_in_memory(b) ? (off_t) (b->last - b->pos): \
113 (b->file_last - b->file_pos)) 113 (b->file_last - b->file_pos))
114 114
115 ngx_buf_t *ngx_create_temp_buf(ngx_pool_t *pool, size_t size); 115 ngx_buf_t *ngx_create_temp_buf(ngx_pool_t *pool, size_t size);
116 ngx_chain_t *ngx_create_chain_of_bufs(ngx_pool_t *pool, ngx_bufs_t *bufs); 116 ngx_chain_t *ngx_create_chain_of_bufs(ngx_pool_t *pool, ngx_bufs_t *bufs);
117 117
118 118
122 122
123 #define ngx_alloc_chain_link(pool) ngx_palloc(pool, sizeof(ngx_chain_t)) 123 #define ngx_alloc_chain_link(pool) ngx_palloc(pool, sizeof(ngx_chain_t))
124 124
125 125
126 #define ngx_alloc_link_and_set_buf(chain, b, pool, error) \ 126 #define ngx_alloc_link_and_set_buf(chain, b, pool, error) \
127 do { \ 127 do { \
128 ngx_test_null(chain, ngx_alloc_chain_link(pool), error); \ 128 ngx_test_null(chain, ngx_alloc_chain_link(pool), error); \
129 chain->buf = b; \ 129 chain->buf = b; \
130 chain->next = NULL; \ 130 chain->next = NULL; \
131 } while (0); 131 } while (0);
132 132
133 133
134 #define ngx_chain_add_link(chain, last, cl) \ 134 #define ngx_chain_add_link(chain, last, cl) \
135 if (chain) { \ 135 if (chain) { \
136 *last = cl; \ 136 *last = cl; \
137 } else { \ 137 } else { \
138 chain = cl; \ 138 chain = cl; \
139 } \ 139 } \
140 last = &cl->next 140 last = &cl->next
141 141
142 142
143 ngx_int_t ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in); 143 ngx_int_t ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in);
144 ngx_int_t ngx_chain_writer(void *ctx, ngx_chain_t *in); 144 ngx_int_t ngx_chain_writer(void *ctx, ngx_chain_t *in);
145 145
146 ngx_int_t ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **chain, 146 ngx_int_t ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **chain,
147 ngx_chain_t *in); 147 ngx_chain_t *in);
148 void ngx_chain_update_chains(ngx_chain_t **free, ngx_chain_t **busy, 148 void ngx_chain_update_chains(ngx_chain_t **free, ngx_chain_t **busy,
149 ngx_chain_t **out, ngx_buf_tag_t tag); 149 ngx_chain_t **out, ngx_buf_tag_t tag);
150 150
151 151
152 #endif /* _NGX_BUF_H_INCLUDED_ */ 152 #endif /* _NGX_BUF_H_INCLUDED_ */