-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.Inconsistencies or issues which will cause an issue or problem for users or implementors.
Description
Description
When using -favicon with -follow-redirects, favicon extraction fails if the redirect changes the host. The issue occurs because the code clones the original request to fetch the resolved favicon URL but does not update the cloned request's Host header after redirects.
Reproduction
Without follow-redirects (works):
echo "https://hackerone.com" | httpx -favicon -json | jq '.favicon'
# Returns: "595148549"With follow-redirects (fails):
echo "https://hackerone.com" | httpx -favicon -follow-redirects -json | jq '.favicon'
# Returns: nullRoot Cause
When the target redirects to a different host (e.g., hackerone.com → www.hackerone.com), the resolved favicon URL points to the final host but the cloned request still has the original Host header, causing the server to return 404 and favicon to be null.
Related PR
Fix implemented in PR #2369 by @wlayzz
Reported by: @Mzack9999
PR: #2369
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.Inconsistencies or issues which will cause an issue or problem for users or implementors.