[yast-commit] r56949 - in /trunk/http-server: VERSION package/yast2-http-server.changes src/YaPI/HTTPD.pm
Author: mzugec Date: Thu Apr 23 18:39:21 2009 New Revision: 56949 URL: http://svn.opensuse.org/viewcvs/yast?rev=56949&view=rev Log: fixed listen.conf parsing problem (bnc#495429) Modified: trunk/http-server/VERSION trunk/http-server/package/yast2-http-server.changes trunk/http-server/src/YaPI/HTTPD.pm Modified: trunk/http-server/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/VERSION?rev=56949&r1=56948&r2=56949&view=diff ============================================================================== --- trunk/http-server/VERSION (original) +++ trunk/http-server/VERSION Thu Apr 23 18:39:21 2009 @@ -1 +1 @@ -2.18.7 +2.18.8 Modified: trunk/http-server/package/yast2-http-server.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/package/yast2-http-server.changes?rev=56949&r1=56948&r2=56949&view=diff ============================================================================== --- trunk/http-server/package/yast2-http-server.changes (original) +++ trunk/http-server/package/yast2-http-server.changes Thu Apr 23 18:39:21 2009 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Apr 23 18:38:08 CEST 2009 - mzugec@suse.cz + +- fixed listen.conf parsing problem (bnc#495429) +- 2.17.8 + +------------------------------------------------------------------- Wed Mar 25 09:24:13 CET 2009 - mzugec@suse.de - for name-based vhosts split configuration files (bnc#427427) Modified: trunk/http-server/src/YaPI/HTTPD.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/src/YaPI/HTTPD.pm?rev=56949&r1=56948&r2=56949&view=diff ============================================================================== --- trunk/http-server/src/YaPI/HTTPD.pm (original) +++ trunk/http-server/src/YaPI/HTTPD.pm Thu Apr 23 18:39:21 2009 @@ -1371,6 +1371,13 @@ =cut +# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#listen +# We support 3 possible values for Listen : +# [IPv6]:port +# IPv4:port +# port +# + BEGIN { $TYPEINFO{GetCurrentListen} = ["function", ["list", [ "map", "string", "any" ] ] ]; } sub GetCurrentListen { my $self = shift; @@ -1380,17 +1387,16 @@ return $self->SetError( %{SCR->Error(".http_server.listen")} ); } foreach my $new ( @{$data[0]} ) { - my ($ip, $fp, $tp, $port) = ('', '', '', ''); + my ($ip, $port) = ('', ''); if ($new =~ m/\[([\w\W]*)\]([\w\W]*)/){ $ip="[$1]"; - if ($2 =~ m/([\d\:]*)/){ - ($fp, $tp) = split(/:/, $1); - } else{ - ( $ip, $fp, $tp ) = split(/:/, $new); - } - $fp=$tp if ($fp eq ''); - $port = ($fp eq $tp)?($fp):($fp.'-'.$tp); - } elsif ($new =~/[\D]*([\d]*)[\D]*/){ + $new=$2; + } elsif ($new =~ m/([\d\.]*):([\w\W]*)/){ + $ip=$1; + $new=$2; + } + + if ($new =~/[\D]*([\d]*)[\D]*/){ $port=$1; } push(@ret, {ADDRESS => $ip, PORT=>$port}); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
mzugec@svn.opensuse.org