diff options
author | Alban Crequy <alban.crequy@collabora.co.uk> | 2011-08-24 16:01:05 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-08-24 20:18:25 +0200 |
commit | 6bf015980b7d2633dbf6ab21c8ba7cc54017aa0b (patch) | |
tree | 5ae074d835d7a2df5fca279331940053479535a0 | |
parent | d968741939686096c7c503861ece78082f98896c (diff) | |
download | pacrunner-6bf015980b7d2633dbf6ab21c8ba7cc54017aa0b.tar.gz |
libproxy: Don't be case sensitive with the strings returned by PAC files
Be compatible with existing PAC files which return something like "proxy
server:port". They work on Windows but they would not work if pacrunner was
case-sensitive.
-rw-r--r-- | libproxy/proxy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libproxy/proxy.c b/libproxy/proxy.c index 641e791..6dfbfd2 100644 --- a/libproxy/proxy.c +++ b/libproxy/proxy.c @@ -77,12 +77,12 @@ static char **extract_result(const char *str) result[0] = NULL; result[1] = NULL; - if (strcmp(str, "DIRECT") == 0) { + if (strcasecmp(str, "DIRECT") == 0) { result[0] = strdup("direct://"); return result; } - if (strncmp(str, "PROXY ", 6) == 0) { + if (strncasecmp(str, "PROXY ", 6) == 0) { int len = strlen(str + 6) + 8; result[0] = malloc(len); if (result[0] != NULL) |