diff options
author | bjoern <bjoern@localhost> | 2004-11-20 09:09:38 +0000 |
---|---|---|
committer | bjoern <bjoern@localhost> | 2004-11-20 09:09:38 +0000 |
commit | 9d0de37023306ce81b6095245e9d6d6c4d3a70b7 (patch) | |
tree | 5c747b51cf629f8973d241ba65eb634ef296e351 | |
parent | dd1463646dcc8a41fbe0059775183f69d26e3c49 (diff) | |
download | markup-validator-9d0de37023306ce81b6095245e9d6d6c4d3a70b7.zip markup-validator-9d0de37023306ce81b6095245e9d6d6c4d3a70b7.tar.gz markup-validator-9d0de37023306ce81b6095245e9d6d6c4d3a70b7.tar.bz2 |
do not crash for schemes that do not support host() like data:
-rwxr-xr-x | httpd/cgi-bin/check | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index c381f12..2bdf2df 100755 --- a/httpd/cgi-bin/check +++ b/httpd/cgi-bin/check @@ -9,7 +9,7 @@ # This source code is available under the license at: # http://www.w3.org/Consortium/Legal/copyright-software # -# $Id: check,v 1.362 2004-11-19 07:12:24 ot Exp $ +# $Id: check,v 1.363 2004-11-20 09:09:38 bjoern Exp $ # # Disable buffering on STDOUT! @@ -222,7 +222,7 @@ Directory not readable (permission denied): @_r # # Strings - $VERSION = q$Revision: 1.362 $; + $VERSION = q$Revision: 1.363 $; $VERSION =~ s/Revision: ([\d\.]+) /$1/; # @@ -1196,7 +1196,7 @@ sub handle_uri { return $File; } - unless ($CFG->{'Allow Private IPs'}) { + unless ($CFG->{'Allow Private IPs'} or !$uri->can('host')) { my $addr = my $iptype = undef; if (my $host = gethostbyname($uri->host())) { $addr = inet_ntoa($host->addr()) if $host->addr(); |