Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help the user understand why HTTP fails #4

Closed
wants to merge 7 commits into from
Closed

Help the user understand why HTTP fails #4

wants to merge 7 commits into from

Conversation

briandfoy
Copy link

@briandfoy briandfoy commented Aug 6, 2023

I ran into a hiccup where something using HTTP::Tiny found a wrong SSL_CERT_FILE environment variable I had. After setting up a new machine with the latest OpenSSL, that file ended up under a different prefix without updating the environment.

HTTP::Tiny can do more to track down this sort of error.

First, in the docs that lay out how HTTP::Tiny finds the cert file, it missed the first step (SSL_options), and also didn't say that a defined but missing SSL_CERT_FILE would stop the process. I fixed that.

I also improved the error message a little so people will know in which step HTTP::Tiny failed.

I don't particularly care about how I typed it out, so change it as appropriate for whatever other concerns you have.

Some previous threads (chansen/p5-http-tiny#151, chansen/p5-http-tiny#152, metacpan/MetaCPAN-Client#117, metacpan/MetaCPAN-Client#82)

First, list in the docs all the steps that HTTP::Tiny takes to find the cert file.

Second, when HTTP::Tiny tried something and gave up, tell the user what it tried.
@briandfoy
Copy link
Author

If no one wants to act on this PR, I'll close it.

lib/HTTP/Tiny.pm Show resolved Hide resolved
lib/HTTP/Tiny.pm Outdated Show resolved Hide resolved
lib/HTTP/Tiny.pm Outdated Show resolved Hide resolved
lib/HTTP/Tiny.pm Outdated Show resolved Hide resolved
@abraxxa
Copy link

abraxxa commented Jul 4, 2024

Can we get these improvements merged? 🙏🏻

@briandfoy
Copy link
Author

It's been awhile, so here's the patch file in case I delete my fork. Typically, I don't let these things linger because it makes a mess of the things I have to track.

http-tiny-4.patch

@briandfoy briandfoy closed this by deleting the head repository Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants