httpx icon indicating copy to clipboard operation
httpx copied to clipboard

Option to set Host Header

Open APT-ZERO opened this issue 1 year ago • 1 comments

As HTTP 'Host' Header changed to 'Authority' in H2, it's good to have a option to set a Host (like -path option) It's good to be able to set a Host different than the TLS SNI to test domain fronting or find a vulnerability

APT-ZERO avatar Nov 10 '24 08:11 APT-ZERO

Thanks so much for your feature requests @APT-ZERO - we'll take a look into these!

GeorginaReeder avatar Nov 11 '24 12:11 GeorginaReeder

@APT-ZERO This is already supported:

$ echo http://127.0.0.1:11000 | go run . -H "Host: test"

This is the corresponding request seen in simplehttpserver:

% go run . -listen :11000 -verbose
...
Remote Address: 127.0.0.1:63951
GET / HTTP/1.1
Host: test
Accept-Charset: utf-8
Accept-Encoding: gzip
Connection: close
User-Agent: Mozilla/5.0 (ZZ; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0


HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Last-Modified: Wed, 18 Sep 2024 15:13:11 GMT



Mzack9999 avatar Aug 15 '25 13:08 Mzack9999

Do you even read the Issues, or you only read the Title?

APT-ZERO avatar Oct 25 '25 19:10 APT-ZERO