comparison src/http/ngx_http_script.c @ 84:991c6e4c7654 NGINX_0_1_42

nginx 0.1.42 *) Bugfix: if the request URI had a zero length after the processing in the ngx_http_proxy_module, then the segmentation fault or bus error occurred in the ngx_http_proxy_module. *) Bugfix: the "limit_rate" directive did not work inside the "if" block; bug appeared in 0.1.38.
author Igor Sysoev <http://sysoev.ru>
date Tue, 23 Aug 2005 00:00:00 +0400
parents da9a3b14312d
children f63280c59dd5
comparison
equal deleted inserted replaced
83:8216480b2a2e 84:991c6e4c7654
685 } 685 }
686 686
687 if (code->uri) { 687 if (code->uri) {
688 r->uri = e->buf; 688 r->uri = e->buf;
689 689
690 if (r->uri.len == 0) {
691 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
692 "the rewritten URI has a zero length");
693 e->ip = ngx_http_script_exit;
694 e->status = NGX_HTTP_INTERNAL_SERVER_ERROR;
695 return;
696 }
697
690 if (ngx_http_set_exten(r) != NGX_OK) { 698 if (ngx_http_set_exten(r) != NGX_OK) {
691 e->ip = ngx_http_script_exit; 699 e->ip = ngx_http_script_exit;
692 e->status = NGX_HTTP_INTERNAL_SERVER_ERROR; 700 e->status = NGX_HTTP_INTERNAL_SERVER_ERROR;
693 return; 701 return;
694 } 702 }
735 e->sp--; 743 e->sp--;
736 744
737 if (e->sp->value) { 745 if (e->sp->value) {
738 if (code->loc_conf) { 746 if (code->loc_conf) {
739 e->request->loc_conf = code->loc_conf; 747 e->request->loc_conf = code->loc_conf;
748 ngx_http_update_location_config(e->request);
740 } 749 }
741 750
742 e->ip += sizeof(ngx_http_script_if_code_t); 751 e->ip += sizeof(ngx_http_script_if_code_t);
743 return; 752 return;
744 } 753 }