comparison src/http/ngx_http_special_response.c @ 143:5526213be452

nginx-0.0.1-2003-10-10-19:10:50 import
author Igor Sysoev <igor@sysoev.ru>
date Fri, 10 Oct 2003 15:10:50 +0000
parents cb77c084acdb
children ef8c87afcfc5
comparison
equal deleted inserted replaced
142:cb77c084acdb 143:5526213be452
198 r->headers_out.content_length = -1; 198 r->headers_out.content_length = -1;
199 } 199 }
200 200
201 rc = ngx_http_send_header(r); 201 rc = ngx_http_send_header(r);
202 202
203 if (rc == NGX_ERROR) { 203 if (rc == NGX_ERROR || r->header_only) {
204 return NGX_ERROR; 204 return rc;
205 }
206
207 if (r->header_only) {
208 ngx_http_finalize_request(r, rc);
209 #if 0
210 if (rc == NGX_AGAIN) {
211 ngx_http_set_write_handler(r);
212 return NGX_AGAIN;
213 }
214 #endif
215
216 return NGX_OK;
217 } 205 }
218 206
219 if (error_pages[err].len == 0) { 207 if (error_pages[err].len == 0) {
220 return NGX_OK; 208 return NGX_OK;
221 } 209 }
234 222
235 h->type = NGX_HUNK_MEMORY|NGX_HUNK_IN_MEMORY; 223 h->type = NGX_HUNK_MEMORY|NGX_HUNK_IN_MEMORY;
236 h->pos = error_tail; 224 h->pos = error_tail;
237 h->last = error_tail + sizeof(error_tail) - 1; 225 h->last = error_tail + sizeof(error_tail) - 1;
238 226
239 if (1) { 227 if (/* STUB: "msie_padding on/off" */ 1) {
240 if (ngx_http_output_filter(r, h) == NGX_ERROR) { 228 if (ngx_http_output_filter(r, h) == NGX_ERROR) {
241 return NGX_ERROR; 229 return NGX_ERROR;
242 } 230 }
243 231
244 ngx_test_null(h, ngx_calloc_hunk(r->pool), NGX_ERROR); 232 ngx_test_null(h, ngx_calloc_hunk(r->pool), NGX_ERROR);
248 h->last = msie_stub + sizeof(msie_stub) - 1; 236 h->last = msie_stub + sizeof(msie_stub) - 1;
249 } 237 }
250 238
251 h->type |= NGX_HUNK_LAST; 239 h->type |= NGX_HUNK_LAST;
252 240
253 rc = ngx_http_output_filter(r, h); 241 return ngx_http_output_filter(r, h);
254
255 ngx_http_finalize_request(r, rc);
256
257 #if 0
258 if (r->main == NULL) {
259 if (rc == NGX_AGAIN) {
260 ngx_http_set_write_handler(r);
261 return NGX_AGAIN;
262 }
263 }
264 #endif
265
266 return NGX_OK;
267
268 } 242 }