Skip to content

error 429, but requests executes the request correctly [duplicate] #9300

Closed Answered by Dreamsorcerer
AndrejedaI asked this question in Q&A
Discussion options

You must be logged in to vote

OK, figured it out for you. Honestly, such a stupid bloody firewall...

    c = ssl.create_default_context()
    c.minimum_version = ssl.TLSVersion.TLSv1_2
    c.maximum_version = ssl.TLSVersion.TLSv1_3

This (a very sensible default) trips the firewall. It seems that accepting a connection with multiple valid TLS versions with an upper limit of 1.3 (despite the server itself doing this) is unacceptable. So, the difference might be that requests and httpx don't support TLS 1.3?

Any of these work fine:

    c = ssl.create_default_context()
    c.minimum_version = ssl.TLSVersion.TLSv1_2
    c.maximum_version = ssl.TLSVersion.TLSv1_2
    c = ssl.create_default_context()
    c.minimum_version …

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
2 replies
@AndrejedaI
Comment options

@AndrejedaI
Comment options

Comment options

You must be logged in to vote
4 replies
@Dreamsorcerer
Comment options

@Dreamsorcerer
Comment options

@Dreamsorcerer
Comment options

Answer selected by AndrejedaI
@sywhb
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants