ducaale / xh

Friendly and fast tool for sending HTTP requests
MIT License
5.49k stars 96 forks source link

`--verify=no` doesn't apply to redirects #368

Closed bdmorin closed 3 months ago

bdmorin commented 4 months ago

Installed via homebrew.

❯ xh --version
xh 0.22.0
-native-tls +rustls

❯ xh -F --verify=no  cli.gorilla-llm.com
xh: error: error sending request for url (https://cli.gorilla-llm.com/)

Caused by:
    0: client error (Connect)
    1: invalid peer certificate: Expired

❯ xh -F --verify no  cli.gorilla-llm.com
xh: error: error sending request for url (https://cli.gorilla-llm.com/)

Caused by:
    0: client error (Connect)
    1: invalid peer certificate: Expired

No matter what I do I can't get xh to ignore the tls expiry date. This might be by design, I don't know.

Thanks.

blyxxyz commented 4 months ago

Thanks for the report. http://cli.gorilla-llm.com redirects to https://cli.gorilla-llm.com and it seems that --verify=no only applies to the first request (which doesn't need it). That's a bug.

When fixing this we should check whether any of the other options have the same problem.

As a workaround you can specify HTTPS explicitly: xh --verify=no https://cli.gorilla-llm.com