aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2012-03-21 23:21:52 +0100
committerDaniel Stenberg <daniel@haxx.se>2012-03-22 00:12:37 +0100
commit805788e0434f4f09d8049c51000af604efb800ed (patch)
treeda99b11d31118a86e8615271739debaf7d460006 /tests
parentdddcd3b0423efa3371c569ade15744669d745e40 (diff)
SWS: refuse to serve CONNECT unless running as proxy
Diffstat (limited to 'tests')
-rw-r--r--tests/server/sws.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/server/sws.c b/tests/server/sws.c
index dddc606db..ef54bc65e 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;
}