--- AnyEvent-HTTP/HTTP.pm 2008/06/09 13:02:13 1.19 +++ AnyEvent-HTTP/HTTP.pm 2008/06/28 21:17:03 1.22 @@ -50,7 +50,7 @@ use base Exporter::; -our $VERSION = '1.01'; +our $VERSION = '1.03'; our @EXPORT = qw(http_get http_post http_head http_request); @@ -95,10 +95,13 @@ response headers as second argument. All the headers in that hash are lowercased. In addition to the response -headers, the three "pseudo-headers" C, C and -C contain the three parts of the HTTP Status-Line of the same -name. If the server sends a header multiple lines, then their contents -will be joined together with C<\x00>. +headers, the "pseudo-headers" C, C and C +contain the three parts of the HTTP Status-Line of the same name. The +pseudo-header C contains the original URL (which can differ from the +requested URL when following redirects). + +If the server sends a header multiple lines, then their contents will be +joined together with C<\x00>. If an internal error occurs, such as not being able to resolve a hostname, then C<$data> will be C, C<< $headers->{Status} >> will be C<599> @@ -465,7 +468,8 @@ } sub http_post($$@) { - unshift @_, "POST", "body"; + my $url = shift; + unshift @_, "POST", $url, "body"; &http_request }