comparison src/http/ngx_http_variables.c @ 928:a6fe6bedb9e3

fix segfault when $host is used and *) request is "GET http://host" without CR or LF, or timed out *) request is "GET http://host" with a large blank space
author Igor Sysoev <igor@sysoev.ru>
date Fri, 15 Dec 2006 10:24:57 +0000
parents 7521e5f5d555
children 664afe2c1480
comparison
equal deleted inserted replaced
927:4f3d57408877 928:a6fe6bedb9e3
676 } else { 676 } else {
677 v->len = r->server_name.len; 677 v->len = r->server_name.len;
678 v->data = r->server_name.data; 678 v->data = r->server_name.data;
679 } 679 }
680 680
681 } else { 681 } else if (r->host_end) {
682 v->len = r->host_end - r->host_start; 682 v->len = r->host_end - r->host_start;
683 v->data = r->host_start; 683 v->data = r->host_start;
684
685 } else {
686 v->not_found = 1;
687 return NGX_OK;
684 } 688 }
685 689
686 v->valid = 1; 690 v->valid = 1;
687 v->no_cachable = 0; 691 v->no_cachable = 0;
688 v->not_found = 0; 692 v->not_found = 0;