ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-HTTP/HTTP.pm
(Generate patch)

Comparing AnyEvent-HTTP/HTTP.pm (file contents):
Revision 1.34 by root, Wed Oct 29 14:51:07 2008 UTC vs.
Revision 1.36 by root, Fri Nov 21 06:56:05 2008 UTC

48use AnyEvent::Socket (); 48use AnyEvent::Socket ();
49use AnyEvent::Handle (); 49use AnyEvent::Handle ();
50 50
51use base Exporter::; 51use base Exporter::;
52 52
53our $VERSION = '1.05'; 53our $VERSION = '1.1';
54 54
55our @EXPORT = qw(http_get http_post http_head http_request); 55our @EXPORT = qw(http_get http_post http_head http_request);
56 56
57our $USERAGENT = "Mozilla/5.0 (compatible; AnyEvent::HTTP/$VERSION; +http://software.schmorp.de/pkg/AnyEvent)"; 57our $USERAGENT = "Mozilla/5.0 (compatible; AnyEvent::HTTP/$VERSION; +http://software.schmorp.de/pkg/AnyEvent)";
58our $MAX_RECURSE = 10; 58our $MAX_RECURSE = 10;
426 426
427 substr $_, 0, 1, "" 427 substr $_, 0, 1, ""
428 for values %hdr; 428 for values %hdr;
429 429
430 my $finish = sub { 430 my $finish = sub {
431 # TODO: use destroy method, when/if available
432 #$state{handle}->destroy; 431 $state{handle}->destroy;
433 $state{handle}->on_eof (undef);
434 $state{handle}->on_error (undef);
435 %state = (); 432 %state = ();
436 433
437 # set-cookie processing 434 # set-cookie processing
438 if ($arg{cookie_jar}) { 435 if ($arg{cookie_jar}) {
439 for ($hdr{"set-cookie"}) { 436 for ($hdr{"set-cookie"}) {
642=head1 AUTHOR 639=head1 AUTHOR
643 640
644 Marc Lehmann <schmorp@schmorp.de> 641 Marc Lehmann <schmorp@schmorp.de>
645 http://home.schmorp.de/ 642 http://home.schmorp.de/
646 643
644With many thanks to Дмитрий Шалашов, who provided countless
645testcases and bugreports.
646
647=cut 647=cut
648 648
6491 6491
650 650

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines