httpx
httpx copied to clipboard
Unable to parse when the returned packet is not in normal http format
httpx version:
v1.2.6
Current Behavior:
[DBG] Failed 'http://*.*.*.*:8080': GET http://*.*.*.*:8080 giving up after 1 attempts: Get "http://*.*.*.*:8080": net/http: HTTP/1.x transport connection broken: malformed MIME header: missing colon: "user\""
[DBG] Failed 'http://*.*.*.*:8080': invalid header line: "user\"\r\n"

Expected Behavior:
The target is accessible and should have normal result output
Steps To Reproduce:
- fofa query:
"wf2411" && port="8080" echo "*.*.*.*:8080" | httpx -debug -unsafe
Anything else:
@No-Github Thanks for opening this issue. Unfortunately the standard library enforces strong validation on http protocol. Probably this will be indirectly fixed with https://github.com/projectdiscovery/rawhttp/pull/112
Although it is possible in some hacky way to override the internal net/textproto/reader.goreadMIMEHeader via linking after testing, it seems pretty much unreliable as the rest of the response fail to be parsed, and numerous runtime errors are introduced. Closing as not planned for the time being, it will be indirectly fixed with https://github.com/projectdiscovery/rawhttp/pull/112 fallback mechanism