Mercurial > hg > nginx
comparison src/http/modules/ngx_http_proxy_module.c @ 3977:2527cdb8d31f
test length of proxy_pass with variables
patch by Lanshun Zhou
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sat, 30 Jul 2011 06:11:46 +0000 |
parents | 215fe9223419 |
children | 3183165283cc |
comparison
equal
deleted
inserted
replaced
3976:215fe9223419 | 3977:2527cdb8d31f |
---|---|
640 == NULL) | 640 == NULL) |
641 { | 641 { |
642 return NGX_ERROR; | 642 return NGX_ERROR; |
643 } | 643 } |
644 | 644 |
645 if (ngx_strncasecmp(proxy.data, (u_char *) "http://", 7) == 0) { | 645 if (proxy.len > 7 |
646 | 646 && ngx_strncasecmp(proxy.data, (u_char *) "http://", 7) == 0) |
647 { | |
647 add = 7; | 648 add = 7; |
648 port = 80; | 649 port = 80; |
649 | 650 |
650 #if (NGX_HTTP_SSL) | 651 #if (NGX_HTTP_SSL) |
651 | 652 |
652 } else if (ngx_strncasecmp(proxy.data, (u_char *) "https://", 8) == 0) { | 653 } else if (proxy.len > 8 |
653 | 654 && ngx_strncasecmp(proxy.data, (u_char *) "https://", 8) == 0) |
655 { | |
654 add = 8; | 656 add = 8; |
655 port = 443; | 657 port = 443; |
656 r->upstream->ssl = 1; | 658 r->upstream->ssl = 1; |
657 | 659 |
658 #endif | 660 #endif |