X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/e8fa8f62da443bfc89c416d3eeafcde69c8c6403..875e0b16f64f7b97171d58fe34ebcd57314eb739:/proxy.c?ds=sidebyside diff --git a/proxy.c b/proxy.c index be238c34..ccb1b5ef 100644 --- a/proxy.c +++ b/proxy.c @@ -15,8 +15,8 @@ #include "proxy.h" #define do_proxy_dns(cfg) \ - (cfg->proxy_dns == 2 || \ - (cfg->proxy_dns == 1 && cfg->proxy_type != PROXY_SOCKS)) + (cfg->proxy_dns == FORCE_ON || \ + (cfg->proxy_dns == AUTO && cfg->proxy_type != PROXY_SOCKS)) /* * Call this when proxy negotiation is complete, so that this @@ -281,7 +281,7 @@ static int proxy_for_destination (SockAddr addr, char *hostname, int port, while (exclude_list[s]) { while (exclude_list[s] && - (isspace(exclude_list[s]) || + (isspace((unsigned char)exclude_list[s]) || exclude_list[s] == ',')) s++; if (!exclude_list[s]) break; @@ -289,7 +289,7 @@ static int proxy_for_destination (SockAddr addr, char *hostname, int port, e = s; while (exclude_list[e] && - (isalnum(exclude_list[e]) || + (isalnum((unsigned char)exclude_list[e]) || exclude_list[e] == '-' || exclude_list[e] == '.' || exclude_list[e] == '*')) e++; @@ -325,7 +325,7 @@ static int proxy_for_destination (SockAddr addr, char *hostname, int port, /* Make sure we really have reached the next comma or end-of-string */ while (exclude_list[s] && - !isspace(exclude_list[s]) && + !isspace((unsigned char)exclude_list[s]) && exclude_list[s] != ',') s++; } @@ -519,7 +519,7 @@ int proxy_http_negotiate (Proxy_Socket p, int change) int i, j, len; sprintf(buf, "%s:%s", p->cfg.proxy_username, p->cfg.proxy_password); len = strlen(buf); - sprintf(buf2, "Proxy-Authorization: basic "); + sprintf(buf2, "Proxy-Authorization: Basic "); for (i = 0, j = strlen(buf2); i < len; i += 3, j += 4) base64_encode_atom((unsigned char *)(buf+i), (len-i > 3 ? 3 : len-i), buf2+j);