-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply TLS options even for non-HTTPS URLs
TLS-related options were only being applied for URLs with a `https://` scheme. But that's too cautious, because we could run into a HTTPS URL after a redirect. I've fixed this by just removing the check. Another option is to also check `args.follow`, but I think it's nicer to do this stuff unconditionally. That way we can consistently give errors for bad options (e.g. `--verify=path/wiht/typo`). Test case: ```shell xh --verify=no --follow http://httpbin.org/redirect-to url==https://expired.badssl.com ``` Fixes #368.
- Loading branch information
Showing
1 changed file
with
69 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters