You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Protocol fallback sends HTTP to HTTPS port (443) causing 400 errors #2335
When httpx falls back from HTTPS to HTTP on targets with explicit port 443, it keeps the same port, causing 400 The plain HTTP request was sent to HTTPS port errors, i.e resulted as valid / open host but it's actually not.
Expected Behavior:
Before:
$ echo "1.117.60.202:443" | httpx -probe
http://1.117.60.202:443 [FAILED] # 400 error - HTTP to HTTPS port
After:
$ echo "1.117.60.202:443" | httpx -probe
http://1.117.60.202:80 [SUCCESS] # Falls back to correct port
Steps To Reproduce:
echo 1.117.60.202:443 | httpx -silent -title
http://1.117.60.202:443 [400 The plain HTTP request was sent to HTTPS port]
Activity
ehsandeep commentedon Dec 8, 2025
Fixed in afd5951