Skip Menu |

This queue is for tickets about the Net-Async-HTTP CPAN distribution.

Report information
The Basics
Id: 87589
Status: rejected
Priority: 0/
Queue: Net-Async-HTTP

People
Owner: Nobody in particular
Requestors: kiyoshi.aman [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: NaHTTP should use HTTP::Request URI objects in request-object mode.
Net::Async::HTTP should, when ->do_request is called with a request object, pull the host, port, and SSL usage from the ->uri method on HTTP::Request objects. If the object doesn't have such data, then it can require at least the host keyword argument. Currently, it requires the host argument always.
On Sun Aug 04 07:33:51 2013, AERDAN wrote: Show quoted text
> Net::Async::HTTP should, when ->do_request is called with a request > object, pull the host, port, and SSL usage from the ->uri method on > HTTP::Request objects. If the object doesn't have such data, then it > can require at least the host keyword argument. Currently, it requires > the host argument always.
This should already be happening: HTTP.pm: 641 my $uri = $request->uri; 642 if( defined $uri->scheme and $uri->scheme =~ m/^http(s?)$/ ) { 643 $host = $uri->host if !defined $host; 644 $port = $uri->port if !defined $port; 645 $ssl = ( $uri->scheme eq "https" ); 646 } And works as advertised: $ perlsh -b eval: use IO::Async::Loop; undef eval: use Net::Async::HTTP; undef eval: IO::Async::Loop->new->add( my $http = Net::Async::HTTP->new ); undef eval: $http->do_request( request => HTTP::Request->new( GET => "http://www.google.com" ) )->get->content_type 'text/html' -- Paul Evans
No activity, looks fine to me. Closing this for now. -- Paul Evans