Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

List query parameters are percent-encoded twice

Đang mở Phù hợp với người mới
#305 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@RaphaelFakhri đang làm issue này rồi.

Từ ngày 10/10/2026.

  • #306 của @RaphaelFakhri — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
88/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend, networking

Hướng nghiên cứu

Tìm build_query_param và chạy bản tái hiện được cung cấp với httpx.MockTransport để kiểm tra tham số collection_refs đã giải mã. Kiểm tra các bài kiểm tra tham số truy vấn gần đó và bổ sung trường hợp cho ký tự dành riêng; hoàn tất khi các phần tử danh sách chỉ được mã hóa một lần và bản tái hiện báo food:pizza.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Python
Star
25
Fork
14
Merge trung bình
18 giờ 23 phút
Pull request đã merge (30 ngày)
12

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của GetStream/stream-py

Tất cả issue của GetStream/stream-py

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.