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.122 by root, Fri May 8 17:28:39 2015 UTC vs.
Revision 1.124 by root, Fri May 8 21:26:16 2015 UTC

194 194
195C<$scheme> must be either missing or must be C<http> for HTTP. 195C<$scheme> must be either missing or must be C<http> for HTTP.
196 196
197If not specified, then the default proxy is used (see 197If not specified, then the default proxy is used (see
198C<AnyEvent::HTTP::set_proxy>). 198C<AnyEvent::HTTP::set_proxy>).
199
200Currently, if your proxy requires authorization, you have to specify an
201appropriate "Proxy-Authorization" header in every request.
199 202
200=item body => $string 203=item body => $string
201 204
202The request body, usually empty. Will be sent as-is (future versions of 205The request body, usually empty. Will be sent as-is (future versions of
203this module might offer more options). 206this module might offer more options).
770 773
771 my $uport = $uscheme eq "http" ? 80 774 my $uport = $uscheme eq "http" ? 80
772 : $uscheme eq "https" ? 443 775 : $uscheme eq "https" ? 443
773 : return $cb->(undef, { @pseudo, Status => 599, Reason => "Only http and https URL schemes supported" }); 776 : return $cb->(undef, { @pseudo, Status => 599, Reason => "Only http and https URL schemes supported" });
774 777
775 $uauthority =~ /^(?: .*\@ )? ([^\@:]+) (?: : (\d+) )?$/x 778 $uauthority =~ /^(?: .*\@ )? ([^\@]+?) (?: : (\d+) )?$/x
776 or return $cb->(undef, { @pseudo, Status => 599, Reason => "Unparsable URL" }); 779 or return $cb->(undef, { @pseudo, Status => 599, Reason => "Unparsable URL" });
777 780
778 my $uhost = lc $1; 781 my $uhost = lc $1;
779 $uport = $2 if defined $2; 782 $uport = $2 if defined $2;
780 783
1120 _destroy_state %state; 1123 _destroy_state %state;
1121 1124
1122 %state = (); 1125 %state = ();
1123 $state{recurse} = 1126 $state{recurse} =
1124 http_request ( 1127 http_request (
1125 $method => $url, 1128 $method => $url,
1126 %arg, 1129 %arg,
1127 recurse => $recurse - 1, 1130 recurse => $recurse - 1,
1128 keepalive => 0, 1131 persistent => 0,
1129 sub { 1132 sub {
1130 %state = (); 1133 %state = ();
1131 &$cb 1134 &$cb
1132 } 1135 }
1133 ); 1136 );

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines