Skip to content

httpx returns 403 for some websites while curl return 200 with content #2224

@borhanDZ

Description

@borhanDZ

Description

When using httpx v1.7.1, some websites respond with 403 Forbidden getting us false results, but using curl with the same URL returns a normal response 200 OK with full HTML content.
##for example:
httpx -u https://hola.example.com -no-decode -debug

Image

While with curl:
curl -k -L https://hola.example.com -i
You get:
HTTP/1.1 200 OK
... (headers)
<html> ... full page content ... </html>

Actual behavior

httpx consistently gets 403 (Access Denied) on this site and several similar Akamai-protected domains

Additional context

  • Happens even with -H "User-Agent: ...", -random-agent, or -H "Accept-Encoding: identity".

  • May be related to subtle differences in TLS fingerprinting / HTTP2 vs HTTP1 negotiation that Akamai WAF detects.

  • Sites behind Akamai often do bot detection using TLS fingerprints. curl has a different fingerprint than httpx.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions