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.31 by root, Fri Oct 24 01:25:54 2008 UTC vs.
Revision 1.33 by root, Mon Oct 27 11:09:54 2008 UTC

104headers, the "pseudo-headers" C<HTTPVersion>, C<Status> and C<Reason> 104headers, the "pseudo-headers" C<HTTPVersion>, C<Status> and C<Reason>
105contain the three parts of the HTTP Status-Line of the same name. The 105contain the three parts of the HTTP Status-Line of the same name. The
106pseudo-header C<URL> contains the original URL (which can differ from the 106pseudo-header C<URL> contains the original URL (which can differ from the
107requested URL when following redirects). 107requested URL when following redirects).
108 108
109If the server sends a header multiple lines, then their contents will be 109If the server sends a header multiple times, then their contents will be
110joined together with a command (C<,>). 110joined together with a comma (C<,>), as per the HTTP spec.
111 111
112If an internal error occurs, such as not being able to resolve a hostname, 112If an internal error occurs, such as not being able to resolve a hostname,
113then C<$data> will be C<undef>, C<< $headers->{Status} >> will be C<599> 113then C<$data> will be C<undef>, C<< $headers->{Status} >> will be C<599>
114and the C<Reason> pseudo-header will contain an error message. 114and the C<Reason> pseudo-header will contain an error message.
115 115
372 372
373 $state{handle}->starttls ("connect") if $rscheme eq "https"; 373 $state{handle}->starttls ("connect") if $rscheme eq "https";
374 374
375 # handle actual, non-tunneled, request 375 # handle actual, non-tunneled, request
376 my $handle_actual_request = sub { 376 my $handle_actual_request = sub {
377# $state{handle}->starttls ("connect") if $uscheme eq "https"; 377 $state{handle}->starttls ("connect") if $uscheme eq "https";
378 378
379 # send request 379 # send request
380 $state{handle}->push_write ( 380 $state{handle}->push_write (
381 "$method $rpath HTTP/1.0\015\012" 381 "$method $rpath HTTP/1.0\015\012"
382 . (join "", map "\u$_: $hdr{$_}\015\012", keys %hdr) 382 . (join "", map "\u$_: $hdr{$_}\015\012", keys %hdr)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines