1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

SWS: refuse to serve CONNECT unless running as proxy

This commit is contained in:
Daniel Stenberg 2012-03-21 23:21:52 +01:00
parent dddcd3b042
commit 805788e043

View File

@ -1944,7 +1944,11 @@ int main(int argc, char *argv[])
if(DOCNUMBER_CONNECT == req.testno) {
/* a CONNECT request, setup and talk the tunnel */
http_connect(&msgsock, sock, &req, hostport);
if(!is_proxy) {
logmsg("received CONNECT but isn't running as proxy! EXIT");
}
else
http_connect(&msgsock, sock, &req, hostport);
break;
}