test proxy supports CONNECT
There's a new 'http-proxy' server for tests that runs on a separate port and lets clients do HTTP CONNECT to other ports on the same host to allow us to test HTTP "tunneling" properly. Test cases now have a <proxy> section in <verify> to check that the proxy protocol part matches correctly. Test case 80, 83, 95, 275, 503 and 1078 have been converted. Test 1316 was added.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# This software is licensed as described in the file COPYING, which
|
||||
# you should have received as part of this distribution. The terms
|
||||
@@ -40,6 +40,7 @@ my $idnum = 1; # dafault http server instance number
|
||||
my $proto = 'http'; # protocol the http server speaks
|
||||
my $pidfile; # http server pid file
|
||||
my $logfile; # http server log file
|
||||
my $connect; # IP to connect to on CONNECT
|
||||
my $srcdir;
|
||||
my $fork;
|
||||
my $gopher = 0;
|
||||
@@ -82,6 +83,12 @@ while(@ARGV) {
|
||||
shift @ARGV;
|
||||
}
|
||||
}
|
||||
elsif($ARGV[0] eq '--connect') {
|
||||
if($ARGV[1]) {
|
||||
$connect = $ARGV[1];
|
||||
shift @ARGV;
|
||||
}
|
||||
}
|
||||
elsif($ARGV[0] eq '--id') {
|
||||
if($ARGV[1] =~ /^(\d+)$/) {
|
||||
$idnum = $1 if($1 > 0);
|
||||
@@ -112,7 +119,12 @@ if(!$logfile) {
|
||||
|
||||
$flags .= "--gopher " if($gopher);
|
||||
$flags .= "--fork " if(defined($fork));
|
||||
$flags .= "--connect $connect " if($connect);
|
||||
$flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
|
||||
$flags .= "--ipv$ipvnum --port $port --srcdir \"$srcdir\"";
|
||||
|
||||
if($verbose) {
|
||||
print STDERR "RUN: server/sws $flags\n";
|
||||
}
|
||||
|
||||
exec("server/sws $flags");
|
||||
|
||||
Reference in New Issue
Block a user