mirror of
https://github.com/nginx/nginx.git
synced 2025-01-23 23:03:18 -06:00
test length of proxy_pass with variables
patch by Lanshun Zhou
This commit is contained in:
parent
c2f852c260
commit
c9468026e7
@ -642,15 +642,17 @@ ngx_http_proxy_eval(ngx_http_request_t *r, ngx_http_proxy_ctx_t *ctx,
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
if (ngx_strncasecmp(proxy.data, (u_char *) "http://", 7) == 0) {
|
||||
|
||||
if (proxy.len > 7
|
||||
&& ngx_strncasecmp(proxy.data, (u_char *) "http://", 7) == 0)
|
||||
{
|
||||
add = 7;
|
||||
port = 80;
|
||||
|
||||
#if (NGX_HTTP_SSL)
|
||||
|
||||
} else if (ngx_strncasecmp(proxy.data, (u_char *) "https://", 8) == 0) {
|
||||
|
||||
} else if (proxy.len > 8
|
||||
&& ngx_strncasecmp(proxy.data, (u_char *) "https://", 8) == 0)
|
||||
{
|
||||
add = 8;
|
||||
port = 443;
|
||||
r->upstream->ssl = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user