chansen / p5-http-tiny

Tiny HTTP Client
https://metacpan.org/dist/HTTP-Tiny
53 stars 52 forks source link

Make _assert_ssl public #67

Closed miyagawa closed 9 years ago

miyagawa commented 9 years ago

It would be nice for the wrapper creators to know whether an HTTP::Tiny installation can do HTTPS requests, before sending one and getting an exception via _asset_ssl.

How about making a public method version of HTTP::Tiny::Handle::_assert_ssl which returns boolean whether the current HTTP::Tiny installation can handle HTTPS?

dagolden commented 9 years ago

Seems quite reasonable.

miyagawa commented 9 years ago

Related: there should be an API to tell if verify_SSL can be safely set :) (so that it won't die in the middle of the request saying "oh well I have SSL libraries but you told me that i have to verify SSL which I actually can't")

Similarly, right now it can be called HTTP::Tiny::Handle->new->_find_CA_file to see if it returns a path or throws an exception.

miyagawa commented 9 years ago

Granted, I can implement my own find_CA_file and pass to the SSL_options->SSL_ca_file so that's not a big deal.

dagolden commented 9 years ago

Latest version can be seen here: 3335a96eade711e0be3abf708795e692aeffac24

Please test and tell me if that's sufficient for what you need.

miyagawa commented 9 years ago

Yes, that works for me!

dagolden commented 9 years ago

OK, I'll ship a TRIAL and see how it smokes, just in case.

On Thu, May 7, 2015 at 5:48 PM, Tatsuhiko Miyagawa <notifications@github.com

wrote:

Yes, that works for me!

— Reply to this email directly or view it on GitHub https://github.com/chansen/p5-http-tiny/issues/67#issuecomment-100029958 .

David Golden dagolden@cpan.org Twitter/IRC: @xdg