--- AnyEvent-HTTP/HTTP.pm 2011/01/11 23:49:37 1.94 +++ AnyEvent-HTTP/HTTP.pm 2011/01/28 01:28:03 1.100 @@ -48,7 +48,7 @@ use base Exporter::; -our $VERSION = '2.01'; +our $VERSION = '2.03'; our @EXPORT = qw(http_get http_post http_head http_request); @@ -548,7 +548,7 @@ $value =~ s/\\(.)/$1/gs; } - push @kv, lc $name, $value; + push @kv, @kv ? lc $name : $name, $value; last unless /\G\s*;/gc; } @@ -715,7 +715,7 @@ my $timeout = $arg{timeout} || $TIMEOUT; my ($uscheme, $uauthority, $upath, $query, undef) = # ignore fragment - $url =~ m|(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:(\?[^#]*))?(?:#(.*))?|; + $url =~ m|^([^:]+):(?://([^/?#]*))?([^?#]*)(?:(\?[^#]*))?(?:#(.*))?$|; $uscheme = lc $uscheme; @@ -1334,8 +1334,8 @@ =head2 HTTP/1.1 FILE DOWNLOAD -Downloading files with HTTP cna be quite tricky, especially when something -goes wrong and you want tor esume. +Downloading files with HTTP can be quite tricky, especially when something +goes wrong and you want to resume. Here is a function that initiates and resumes a download. It uses the last modified time to check for file content changes, and works with many