# Load serverpidfile hash with pidfile names for all possible servers.
#
sub init_serverpidfile_hash {
- for my $proto (('ftp', 'http', 'imap', 'pop3', 'smtp')) {
+ for my $proto (('ftp', 'http', 'imap', 'pop3', 'smtp', 'http/2')) {
for my $ssl (('', 's')) {
for my $ipvnum ((4, 6)) {
for my $idnum ((1, 2, 3)) {
}
}
}
- for my $proto (('http', 'imap', 'pop3', 'smtp')) {
+ for my $proto (('http', 'imap', 'pop3', 'smtp', 'http/2')) {
for my $ssl (('', 's')) {
my $serv = servername_id("$proto$ssl", "unix", 1);
my $pidf = server_pidfilename("$proto$ssl", "unix", 1);
my $pidfile;
my $logfile;
my $flags = "";
- my $proto="http2";
+ my $proto="http/2";
my $ipvnum = 4;
my $idnum = 0;
my $exe = "$perl $srcdir/http2-server.pl";
# http2 enabled
$has_http2=1;
- push @protocols, 'http2';
+ push @protocols, 'http/2';
}
}
#
next;
}
}
- elsif($1 eq "http2") {
+ elsif($1 eq "http/2") {
if($has_http2) {
next;
}
for(@what) {
my (@whatlist) = split(/\s+/,$_);
my $what = lc($whatlist[0]);
- $what =~ s/[^a-z0-9-]//g;
+ $what =~ s/[^a-z0-9\/-]//g;
my $certfile;
if($what =~ /^(ftp|http|imap|pop3|smtp)s((\d*)(-ipv6|-unix|))$/) {
$run{'gopher-ipv6'}="$pid $pid2";
}
}
- elsif($what eq "http2") {
- if(!$run{'http2'}) {
+ elsif($what eq "http/2") {
+ if(!$run{'http/2'}) {
($pid, $pid2) = runhttp2server($verbose, $HTTP2PORT);
if($pid <= 0) {
return "failed starting HTTP/2 server";
}
- logmsg sprintf ("* pid http => %d %d\n", $pid, $pid2)
+ logmsg sprintf ("* pid http/2 => %d %d\n", $pid, $pid2)
if($verbose);
- $run{'http2'}="$pid $pid2";
+ $run{'http/2'}="$pid $pid2";
}
}
elsif($what eq "http") {
$proto = uc($proto) if($proto);
die "unsupported protocol: '$proto'" unless($proto &&
- ($proto =~ /^(((FTP|HTTP|IMAP|POP3|SMTP|HTTP-PIPE)S?)|(TFTP|SFTP|SOCKS|SSH|RTSP|GOPHER|HTTPTLS|HTTP2))$/));
+ ($proto =~ /^(((FTP|HTTP|HTTP\/2|IMAP|POP3|SMTP|HTTP-PIPE)S?)|(TFTP|SFTP|SOCKS|SSH|RTSP|GOPHER|HTTPTLS))$/));
$ipver = (not $ipver) ? 'ipv4' : lc($ipver);
die "unsupported IP version: '$ipver'" unless($ipver &&
my ($proto, $ipver, $idnum) = @_;
my $string = lc(servername_str($proto, $ipver, $idnum));
$string =~ tr/-/_/;
+ $string =~ s/\//_v/;
return $string;
}