Open ThiefMaster opened 12 years ago
No updates since 8 years?
We'd love to fix this, but when looking into it, we see it still blocked in the underlying libraries. We'll keep looking for solutions, but we can't promise any timeline since we don't see any easy fix.
Help or pointers very welcome!
@Almad could you give some pointers on this bug what kind of blockers you see, so whoever is interested in helping here doesn't have to dig out that information again? Thanks!
Ah, apologies, somehow thought it's linked here— https://github.com/psf/requests/issues/1691
For http
(not https), there's a workaround in that you can give the hostname as an IPv6 IP address, and pass the host name as Host:example.com
(with your real target domain).
https --print=Hh https://[YOUR-IPv6-ADDR-IN-BRACKETS]/ Host:example.com
It doesn't work for HTTPS because the SSL certificate is assigned to a host name that doesn't match the IP you are connecting to.
It looks like to really fix this, a different upstream library would needed, as it seems the current one is not going to support this (or can't).
This is most likely fixed by https://github.com/httpie/cli/pull/1531 If the project owner agrees to merge it.
Meanwhile, you may try it (the patch) yourself.
pip install "git+https://github.com/Ousret/HTTPie.git@feature-tryout-niquests" -U
And do https -4 https://pie.dev/get
or https -6 https://pie.dev/get
@Ousret I tested that fork and found that the -4
and -6
flags both worked as expected. Thank you.
I installed privately with pipx
to not conflict with a global version.
Would be useful in some cases, e.g. when a host serves different responses depending on the IP version.
-4
and-6
are pretty common for this anyway.