Mercurial > hg > nginx
comparison src/http/modules/ngx_http_proxy_module.c @ 4045:2d062c031fff stable-1.0
Merge of r3964, r3977, r3978:
Proxy related fixes:
*) finalizing with rc == 0 in unbuffered proxy mode caused nginx to wait
for another send_timeout before actually closing client's connection
if client timed out while still talking to upstream server
*) update r3945 with more descriptive error message
*) test length of proxy_pass with variables;
patch by Lanshun Zhou
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 29 Aug 2011 12:56:09 +0000 |
parents | f4c49c9e4bb5 |
children | 88369902edb1 |
comparison
equal
deleted
inserted
replaced
4044:0ea785433fcf | 4045:2d062c031fff |
---|---|
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 |
1705 conf->upstream.change_buffering = 1; | 1707 conf->upstream.change_buffering = 1; |
1706 | 1708 |
1707 conf->headers_hash_max_size = NGX_CONF_UNSET_UINT; | 1709 conf->headers_hash_max_size = NGX_CONF_UNSET_UINT; |
1708 conf->headers_hash_bucket_size = NGX_CONF_UNSET_UINT; | 1710 conf->headers_hash_bucket_size = NGX_CONF_UNSET_UINT; |
1709 | 1711 |
1712 ngx_str_set(&conf->upstream.module, "proxy"); | |
1713 | |
1710 return conf; | 1714 return conf; |
1711 } | 1715 } |
1712 | 1716 |
1713 | 1717 |
1714 static char * | 1718 static char * |