… | |
… | |
46 | use AnyEvent::Util (); |
46 | use AnyEvent::Util (); |
47 | use AnyEvent::Handle (); |
47 | use AnyEvent::Handle (); |
48 | |
48 | |
49 | use base Exporter::; |
49 | use base Exporter::; |
50 | |
50 | |
51 | our $VERSION = 2.24; |
51 | our $VERSION = 2.25; |
52 | |
52 | |
53 | our @EXPORT = qw(http_get http_post http_head http_request); |
53 | our @EXPORT = qw(http_get http_post http_head http_request); |
54 | |
54 | |
55 | our $USERAGENT = "Mozilla/5.0 (compatible; U; AnyEvent-HTTP/$VERSION; +http://software.schmorp.de/pkg/AnyEvent)"; |
55 | our $USERAGENT = "Mozilla/5.0 (compatible; U; AnyEvent-HTTP/$VERSION; +http://software.schmorp.de/pkg/AnyEvent)"; |
56 | our $MAX_RECURSE = 10; |
56 | our $MAX_RECURSE = 10; |
… | |
… | |
1238 | # $state{handle}->destroyed |
1238 | # $state{handle}->destroyed |
1239 | # and die "AnyEvent::HTTP: unexpectedly got a destructed handle (1), please report.";#d# |
1239 | # and die "AnyEvent::HTTP: unexpectedly got a destructed handle (1), please report.";#d# |
1240 | $prepare_handle->(); |
1240 | $prepare_handle->(); |
1241 | # $state{handle}->destroyed |
1241 | # $state{handle}->destroyed |
1242 | # and die "AnyEvent::HTTP: unexpectedly got a destructed handle (2), please report.";#d# |
1242 | # and die "AnyEvent::HTTP: unexpectedly got a destructed handle (2), please report.";#d# |
|
|
1243 | $rpath = $upath; |
1243 | $handle_actual_request->(); |
1244 | $handle_actual_request->(); |
1244 | |
1245 | |
1245 | } else { |
1246 | } else { |
1246 | my $tcp_connect = $arg{tcp_connect} |
1247 | my $tcp_connect = $arg{tcp_connect} |
1247 | || do { require AnyEvent::Socket; \&AnyEvent::Socket::tcp_connect }; |
1248 | || do { require AnyEvent::Socket; \&AnyEvent::Socket::tcp_connect }; |