No Server Response when using Proxy
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python
- Domain
- networking
Research direction
Start by reproducing the Discord request through an HTTP proxy using the shown httpx.Client configuration, recording the Python, httpx, proxy, and traceback details. Trace the request from the Client entry point to the proxy response handling; done means the request completes without the reported server-closed exception under the reproduced conditions.
Written by the indexing model from the issue text.
Description
Originally opened by
@FuckingToasterson 2022-09-05 13:23:01 in encode/httpx
Describe the bug
Earlier, i had a read timeout error when using proxies which i solved by adding timeout=None in the httpx.Client() function.
Now, when choosing http proxies it work fine for some time but it randomly start crashing with a exception: Server closed without sending response
Don't tell me stuff like "that's a duplicate of ..." I've looked on other Answers on Stackoverflow & Github but none of these helped me to solve the issue i am facing.
To Reproduce
Do a http request to discord.com while using proxies:
data1 = {"foo": "bar"}
with httpx.Client(headers=HEADERS, timeout=timeout, proxies=proxyauth if proxytype != "" else None) as client:
resp2 = client.post("https://discord.com/api/v9/users/`@me`", json=data1)
lock.acquire()
if resp2.status_code == 204: pystyle.Write.Print("\t[+] Successfully requested api!\n", pystyle.Colors.green, interval=0)
lock.release()
Expected behavior
In case you use a proxy, it should request the api as usual without the traceback.
- Dominant language
- Python
- Stars
- 1.6k
- Forks
- 103
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 25
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pydantic/httpx2
-
Please revert aiter_bytes signature to AsyncIteratorMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
pydantic/httpx2#1158 · 2 comments ·
Maintainers usually reply within 1 day
-
Export AutoBackendMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
pydantic/httpx2#1131 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Mention header name error message for invalid header encodingsMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
pydantic/httpx2#864 · 3 comments ·
Maintainers usually reply within 1 day
-
Support DigestAuth with "x-www-authenticate" in first response headerPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
Similar issues
-
Email validation accepts a trailing newlinePossibly taken @marcello-pichini claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
dbt-labs/spark-utils#51 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug frontend
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
vendrabuck/HERD#1419 ·
Maintainers usually reply within 1 day