Skip to content

Incorrect host header used for favicon grab if stored on a different host #1333

@gf13579

Description

@gf13579

httpx version:

1.3.4

Current Behavior:

If a website (example.com) references a favicon stored on a different host (some-cdn.com), httpx fails to download it as it it makes the GET against some-cdn.com but includes host: example.com in the request headers.

Expected Behavior:

httpx downloads the favicon from the second host successfully - by not using the first host in the request headers.

Steps To Reproduce:

  1. Run httpx -u https://spirit.com.au/ -favicon and observe the lack of favicon
  2. Run the same command but with -json and observe the correct favicon_path
  3. Start a web proxy (e.g. Burp) on 8080 and run httpx -u https://spirit.com.au/ -favicon -http-proxy http://localhost:8080
  4. Observe that the Host header value is spirit.com.au when it should be assets-global.website-fil...

httpx-favicon-issue

Metadata

Metadata

Assignees

Labels

Status: CompletedNothing further to be done with this issue. Awaiting to be closed.Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions