Skip to content

Icon retrieval error #2203

Closed
Closed

Description

@Autumn-27

httpx version:

v1.6.9 (Windows amd64)


Current Behavior:

When running httpx with -favicon flag against https://211.148.131.226:10443/, the command completes without showing favicon information, though the website has a visible favicon in browsers.

Command used:

httpx.exe -u https://211.148.131.226:10443/ -fr -sc -favicon

Actual output:

https://211.148.131.226:10443/ [302,200] [https://211.148.131.226:10443/global-protect/login.esp] []

Expected Behavior:
Output should either:

Include favicon hash (e.g. [favicon:-631559155]) when found


Steps To Reproduce:
Run: httpx.exe -u https://211.148.131.226:10443/ -fr -sc -favicon

Observe missing favicon information

Verify favicon exists via browser

After debugging, it was found that the correct path for extracting ICO was/portal/images/favicon.ico. However, due to, the correct ICO path is https://211.148.131.226:10443/global-protect/portal/images/favicon.ico And deployment is not https://211.148.131.226:10443/portal/images/favicon.ico

Activity

  1. added
    Type: Bug
    on Jun 29, 2025
  2. self-assigned this
    on Jul 1, 2025
  3. oxqnd commented on Jul 19, 2025

    @oxqnd

    Hi, is anyone currently working on this? If not, I’d like to take a shot at fixing it.

  4. ehsandeep commented on Jul 19, 2025

    @ehsandeep
    Member

    @oxqnd feel free to pick this up!

  5. oxqnd commented on Jul 20, 2025

    @oxqnd

    @ehsandeep Hi, I’ve been looking further into this issue.
    In the HTML, the favicon is referenced as a relative path like , but the actual favicon is located at /global-protect/portal/images/favicon.ico, so the current path resolution fails.
    I think there are two possible approaches to fix this:

    1. Add a hardcoded fallback like /global-protect
    2. Dynamically infer the base path for the favicon based on the final redirected URL

    Personally, I think option 2 would be more flexible across different environments, but I’d love to hear your thoughts on this.
    Is there a preferred direction for handling this?

  6. ehsandeep commented on Jul 20, 2025

    @ehsandeep
    Member

    @oxqnd we should definitely avoid hardcoding anything, as it’s application-specific and each app will have different paths. We should focus on dynamic ways to determine the correct path.

  7. added
    Status: Completed
    on Jul 24, 2025
  8. added theissue type on Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: CompletedType: Bug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions