X-Git-Url: https://git.jankratochvil.net/?a=blobdiff_plain;f=bin%2Fhttpgetdumb;h=6ea04e043eb9e28e7c19bc30955712f6ffa458e0;hb=b09c490633bc1a1b259db15f6f9251fa6ff5dbce;hp=9aafa318dbb5ca89365d1f50d6412a7b1d1de180;hpb=4797c4ec63b172e35ca6f9bb85c2a87ac5b9334c;p=nethome.git diff --git a/bin/httpgetdumb b/bin/httpgetdumb index 9aafa31..6ea04e0 100755 --- a/bin/httpgetdumb +++ b/bin/httpgetdumb @@ -14,7 +14,7 @@ use constant BUFFER_LENGTH=>0x1000; my %opts; getopts "hH",\%opts or die "getopts()"; -@ARGV==1 && $ARGV[0]=~m#^http://([^/]+)(:\d+)?(/.*)$# +@ARGV==1 && $ARGV[0]=~m#^http://([^/:]+)(?::(\d+))?(/.*)$# or die "Syntax: $0 [-hH] http://hostname/pathname"; my($host,$port,$path)=($1,$2,$3); defined $port or $port=DEFAULT_PORT;