evdb / HTTP-Async

process multiple HTTP requests in parallel without blocking
http://search.cpan.org/dist/HTTP-Async/lib/HTTP/Async.pm
8 stars 14 forks source link

https support #1

Closed ironcamel closed 12 years ago

ironcamel commented 12 years ago

This module does not seem to work for https urls. Am I doing something wrong, or does this module not support https?

evdb commented 12 years ago

It does not support HTTPS - but probably could do now.

In Async.pm line 652 you can see where the Net::HTTP::NB object is created. I think it would be possible to use a Net::HTTPS::NB object instead as the API is very similar.

I'm too busy too look at this now but please feel free to fork the repo and send me a pull request :)

ironcamel commented 12 years ago

Thanks, I will look into it.

ironcamel commented 12 years ago

I got it working simply by changing line 652 to use Net::HTTPS::NB instead of Net::HTTP::NB. But I'm wondering if it is too heavy handed to require Net::HTTPS::NB and it's ssl deps, which probably will require users to have something like libssh-dev linux package installed. Do you think we should try to dynamically load Net::HTTPS::NB if the url starts with https? And if the user does not have the package, it will die with a message saying they should install it. This is the approach I have seen the Dancer folks use to minimize their "hard" dependencies.

evdb commented 12 years ago

Yes - it would definitely be my preference to not force it as a hard dependency :)

ironcamel commented 12 years ago

@evdb that's what I did. Please see pull request #2. Thanks.

evdb commented 12 years ago

Pull request merged in - version 0.10 is on its way to CPAN now. Thank you!

ironcamel commented 12 years ago

Thanks for the quick response! I have one more suggestion. I first filed an RT ticket for this because the cpan and metacpan websites list RT as your bugtracker https://rt.cpan.org/Public/Dist/Display.html?Status=Active&Name=HTTP-Async. Yet, I just noticed at the end of the documentation for your module, you point people to github. You should update your Makefile/META.yml to point your bugtracker to github. Then the bugtracker link on cpan/metacpan will point here.