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
1 changed files with 5 additions and 1 deletions

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;
}