tests: add HTTP UNIX socket server testing support

The variable `$ipvnum` can now contain "unix" besides the integers 4
and 6 since the variable. Functions which receive this parameter
have their `$port` parameter renamed to `$port_or_path` to support a
path to the UNIX domain socket (as a "port" is only meaningful for TCP).

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
This commit is contained in:
Peter Wu
2014-11-27 23:59:23 +01:00
committed by Daniel Stenberg
parent 99fb36797a
commit f1cc2a2c0c
5 changed files with 106 additions and 16 deletions

View File

@@ -109,8 +109,8 @@ sub servername_str {
$ipver = (not $ipver) ? 'ipv4' : lc($ipver);
die "unsupported IP version: '$ipver'" unless($ipver &&
($ipver =~ /^(4|6|ipv4|ipv6|-ipv4|-ipv6)$/));
$ipver = ($ipver =~ /6$/) ? '-IPv6' : '';
($ipver =~ /^(4|6|ipv4|ipv6|-ipv4|-ipv6|unix)$/));
$ipver = ($ipver =~ /6$/) ? '-IPv6' : (($ipver =~ /unix$/) ? '-unix' : '');
$idnum = 1 if(not $idnum);
die "unsupported ID number: '$idnum'" unless($idnum &&