HTTPS request when enable authCredentials

李睿 <[email protected]> Tue, 2 Jul 2013 18:15:06 +0800
Newsgroups gmane.comp.web.polipo.user
Message-ID <CAC+CVES5bj4Svn7WYC3kPTcOc4YQXgUU1Niy2aacQoqAric5JA@mail.gmail.com>
i enable authCredentials in config file
it works very good for http request,but not for https request.

i found that polipo can not recognize Proxy-Authorization from Headers when
recieve a https request.

Proxy-Authorization is a part of Headers, so it was encrypted.

i don't know if my understanding is correct.
this is a temporary patch to solve this problem.

---
rui7905

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

_______________________________________________
Polipo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/polipo-users
https_auth-1.0.4.1.patch (application/octet-stream, 586 B)
diff -uNr polipo-1.0.4.1/auth.c polipo-1.0.4.1.patch/auth.c
--- polipo-1.0.4.1/auth.c       2010-02-01 07:13:20.000000000 +0800
+++ polipo-1.0.4.1.patch/auth.c 2013-06-03 14:34:24.000000000 +0800
@@ -58,6 +58,11 @@
     if(authRealm == NULL || authCredentials == NULL)
         return 0;

+    int x, y, z, port;
+    parseUrl(url->string, url->length, &x, &y, &port, &z);
+    if(port < 0)
+        return 0;
+
     if(auth == NULL)
         code = buildClientAuthHeaders(url, "required", &message, &headers);
     else if(auth->length >= 6 || lwrcmp(auth->string, "basic ", 6) == 0) {