No Server Response when using Proxy

オープン
#709 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
python
領域
networking

調査の方向性

まず、示されている httpx.Client の設定を使用して HTTP プロキシ経由で Discord リクエストを再現し、Python、httpx、プロキシ、traceback の詳細を記録します。Client のエントリーポイントからプロキシレスポンスの処理までリクエストを追跡します。再現した条件下で、報告されているサーバー切断例外が発生せずにリクエストが完了すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Originally opened by @FuckingToasters on 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.

主要言語
Python
スター
1.6k
フォーク
103
平均マージ
1日 19時間
マージ済み PR(30日)
25

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pydantic/httpx2 のほかの issue

pydantic/httpx2 の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。