aboutsummaryrefslogtreecommitdiffstats
path: root/libproxy
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2010-11-13 11:20:20 +0000
committerSamuel Ortiz <sameo@linux.intel.com>2010-11-23 15:00:35 +0100
commit4ec7d20ffdd7fb7bd7163d84ea2dd322ab86ea4d (patch)
tree5bcb08df5a58f08838df1cea62ccadff9647b2a3 /libproxy
parent7c336024e17149e2fb55e2c3d373d2fec9ec726e (diff)
downloadpacrunner-4ec7d20ffdd7fb7bd7163d84ea2dd322ab86ea4d.tar.gz
libproxy: Always return PROXY result as http:// URL
Using the scheme of the original requested URL is wrong; the fact that we're going to use our proxy to access an external https server does *not* mean we connect to the proxy using SSL.
Diffstat (limited to 'libproxy')
-rw-r--r--libproxy/proxy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libproxy/proxy.c b/libproxy/proxy.c
index 16953bb..adb8282 100644
--- a/libproxy/proxy.c
+++ b/libproxy/proxy.c
@@ -83,10 +83,10 @@ static char **extract_result(const char *str, const char *scheme)
}
if (strncmp(str, "PROXY ", 6) == 0) {
- int len = strlen(scheme) + strlen(str + 6) + 4;
+ int len = strlen(str + 6) + 8;
result[0] = malloc(len);
if (result[0] != NULL)
- sprintf(result[0], "%s://%s", scheme, str + 6);
+ sprintf(result[0], "http://%s", str + 6);
return result;
}