Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

List query parameters are percent-encoded twice

オープン 初心者向け
#305 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

@RaphaelFakhri がすでに取り組んでいます。

2026年10月10日 から。

  • #306 @RaphaelFakhri による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
88/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python

調査の方向性

build_query_param を作成し、用意された httpx.MockTransport の再現コードを実行して、デコードされた collection_refs パラメータを調べます。近くのクエリパラメータのテストを確認し、予約文字のテストを追加します。完了条件は、リストの項目が一度だけエンコードされ、再現コードが food:pizza を報告することです。

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

説明

Description

build_query_param percent-encodes each item of a list parameter with urllib.parse.quote before it joins the items with commas. httpx then encodes the whole query string again, so every character that quote escapes reaches the server double-encoded.

For example, client.feeds.read_collections(collection_refs=["food:pizza"]) sends:

GET /api/v2/feeds/collections?collection_refs=food%253Apizza

The server decodes this once to food%3Apizza instead of food:pizza. Collection references always contain :, so read_collections and delete_collections cannot match any collection. The same applies to any list parameter item that contains a space, :, @, , or another reserved character, for example in get_many_messages(ids=...), member_custom_include and the moderation ids.

getstream-go and stream-node join list items with commas and encode the query string once, so they send collection_refs=food%3Apizza.

Steps to reproduce
import httpx
from getstream import Stream

seen = []
client = Stream(
    api_key="key",
    api_secret="secret",
    transport=httpx.MockTransport(
        lambda r: seen.append(r)
        or httpx.Response(200, json={"duration": "0ms", "collections": []})
    ),
)
client.feeds.read_collections(collection_refs=["food:pizza"])
print(seen[0].url.params["collection_refs"])

Expected output: food:pizza

Actual output: food%3Apizza

主要言語
Python
スター
25
フォーク
14
平均マージ
18時間 23分
マージ済み PR(30日)
12

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

GetStream/stream-py のほかの issue

GetStream/stream-py の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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