comparison src/http/ngx_http_special_response.c @ 230:38e7b94d63ac NGINX_0_4_0

nginx 0.4.0 *) Change in internal API: the HTTP modules initialization was moved from the init module phase to the HTTP postconfiguration phase. *) Change: now the request body is not read beforehand for the ngx_http_perl_module: it's required to start the reading using the $r->has_request_body method. *) Feature: the ngx_http_perl_module supports the DECLINED return code. *) Feature: the ngx_http_dav_module supports the incoming "Date" header line for the PUT method. *) Feature: the "ssi" directive is available inside the "if" block. *) Bugfix: a segmentation fault occurred if there was an "index" directive with variables and the first index name was without variables; bug appeared in 0.1.29.
author Igor Sysoev <http://sysoev.ru>
date Wed, 30 Aug 2006 00:00:00 +0400
parents 9eebc1b2cdbb
children c982febb7588
comparison
equal deleted inserted replaced
229:1965c8e23be7 230:38e7b94d63ac
305 u_char *p; 305 u_char *p;
306 size_t msie_refresh; 306 size_t msie_refresh;
307 ngx_int_t rc; 307 ngx_int_t rc;
308 ngx_buf_t *b; 308 ngx_buf_t *b;
309 ngx_str_t *uri, *location; 309 ngx_str_t *uri, *location;
310 ngx_uint_t i, err, msie_padding; 310 ngx_uint_t i, n, err, msie_padding;
311 ngx_chain_t *out, *cl; 311 ngx_chain_t *out, *cl;
312 ngx_http_err_page_t *err_page; 312 ngx_http_err_page_t *err_page;
313 ngx_http_core_loc_conf_t *clcf; 313 ngx_http_core_loc_conf_t *clcf;
314 314
315 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 315 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
373 err_page[i].uri_values->elts) 373 err_page[i].uri_values->elts)
374 == NULL) 374 == NULL)
375 { 375 {
376 return NGX_ERROR; 376 return NGX_ERROR;
377 } 377 }
378
379 if (r->zero_in_uri) {
380 for (n = 0; n < uri->len; n++) {
381 if (uri->data[n] == '\0') {
382 goto zero;
383 }
384 }
385
386 r->zero_in_uri = 0;
387 }
388
389 } else {
390 r->zero_in_uri = 0;
378 } 391 }
392
393 zero:
379 394
380 if (uri->data[0] == '/') { 395 if (uri->data[0] == '/') {
381 return ngx_http_internal_redirect(r, uri, NULL); 396 return ngx_http_internal_redirect(r, uri, NULL);
382 } 397 }
383 398