From: Daniel Stenberg Date: Wed, 21 Mar 2012 22:21:52 +0000 (+0100) Subject: SWS: refuse to serve CONNECT unless running as proxy X-Git-Tag: curl-7_25_0~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=805788e0434f4f09d8049c51000af604efb800ed;p=thirdparty%2Fcurl.git SWS: refuse to serve CONNECT unless running as proxy --- diff --git a/tests/server/sws.c b/tests/server/sws.c index dddc606dbc..ef54bc65ea 100644 --- a/tests/server/sws.c +++ b/tests/server/sws.c @@ -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; }