Query values are split at literal commas or lost when arrays are used

Đang mở
#3,623 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

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

Từ ngày 18/10/2026.

  • #3624 của @hutiefang76 — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/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ệ
java
Lĩnh vực
api, backend, networking

Hướng nghiên cứu

Trace query construction and parameter expansion from Feign's Client implementations, focusing on literal @RequestLine values, @QueryMap, and array-valued @Param expressions. Reproduce the reported cases with a recording Client, then add or update focused regression tests covering scalar, collection, primitive-array, empty/null, and reserved-character behavior while preserving custom Param.Expander behavior. The work is done when literal commas remain within one query value and arrays expand correctly across all listed paths.

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

Mô tả

Three query-value paths change or lose the caller's values on current master (e32547ac):

  • A literal @RequestLine("GET /x?ids=1,2") becomes ?ids=1&ids=2, changing one value into two parameters. A percent-encoded comma would be fine; repeated parameters are the problem. Collection expressions should still expand as before.
  • @QueryMap with Map.of("ids", new int[]{1, 2}) sends an array identity such as ids=%5BI%40.... The same happens for primitive-array fields of query-map DTOs. String[] values in a query map already work.
  • @RequestLine("GET /x?ids={ids}") with @Param("ids") int[] also sends the array identity; @Param String[] is affected too. This is a separate expression-expansion path from the query-map case.

I reproduced these with a recording Client and ran the regression tests using the dev profile (Java 8 main compilation and a JDK 27 test JVM). I'll prepare a focused fix with collection, scalar, empty/null-array and reserved-character controls. Existing custom Param.Expander behavior will be preserved.

The inherited-field collision candidate is outside this scope; it needs a separate decision about name precedence. No changes to #3613 or #3612 are intended.

Ngôn ngữ chính
Java
Star
9.8k
Fork
2k
Merge trung bình
1 giờ 15 phút
Pull request đã merge (30 ngày)
39

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

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 OpenFeign/feign

Tất cả issue của OpenFeign/feign

Issue tương tự

Thêm issue về Java

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.