From cb3ca6b4df4d872e7bab66beb3f61358d3f9157d Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Mon, 5 Feb 2001 17:58:23 +0000 Subject: [PATCH] Dynamic patch to transform the URL returned by $d->url in the complete one. The patch involves calling gethostbyname(). I don't know better solutions --- helm/http_getter/http_getter.pl.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/helm/http_getter/http_getter.pl.in b/helm/http_getter/http_getter.pl.in index 0ea2c02e4..e2ebb20d0 100755 --- a/helm/http_getter/http_getter.pl.in +++ b/helm/http_getter/http_getter.pl.in @@ -63,7 +63,15 @@ use Compress::Zlib; my $d = new HTTP::Daemon LocalPort => 8081; my $myownurl = $d->url; + +# Let's patch the returned URL $myownurl =~ s/\/$//; # chop the final slash +my $myownport = $myownurl; +$myownport =~ s/http:\/\/(.*):(.*)/$2/; +$myownurl =~ s/http:\/\/(.*):(.*)/$1/; +($myownurl) = gethostbyname($myownurl); +$myownurl = "http://".$myownurl.":".$myownport; + tie(%map, 'DB_File', $uris_dbm.".db", O_RDONLY, 0664); print "Please contact me at: \n"; print "helm_dir: $helm_dir\n"; -- 2.39.2