MultipartBody incorrectly appends a new line to string values
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đá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
- 74/100
Hướng nghiên cứu
Trước tiên, hãy tìm MultipartBody và logic tuần tự hóa multipart của nó, sau đó kiểm tra cách các giá trị phần kiểu chuỗi và dấu phân cách boundary được ghi. Thêm hoặc cập nhật một kiểm thử tuần tự hóa tập trung cho giá trị chuỗi không có ký tự xuống dòng ở cuối; đầu ra cần đặt CRLF của boundary đúng vị trí mà không thêm dòng mới vào giá trị.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The following code:
import com.microsoft.kiota.MultipartBody;
MultipartBody body = new MultipartBody();
body.addOrReplacePart("fileCreatedAt", "text/plain", "2026-11-15T22:54:31.014Z");
Produces the following output, which has an incorrect extra \r\n after the value and before the separator:
--db526cd4e4a945aaa9f079d8c9497dbf
Content-Type: text/plain
Content-Disposition: form-data; name="fileCreatedAt"
2026-11-15T22:54:31.014Z
--db526cd4e4a945aaa9f079d8c9497dbf--
The correct serialisation should have the value on the line directly preceding the separator. I ran into issue with the current implementation with services (correctly) adding the new line to the end of the value, which then failed to match their validation regex.
The correct serialisation is:
--db526cd4e4a945aaa9f079d8c9497dbf
Content-Type: text/plain
Content-Disposition: form-data; name="fileCreatedAt"
2026-11-15T22:54:31.014Z
--db526cd4e4a945aaa9f079d8c9497dbf--
As per: https://www.rfc-editor.org/info/rfc2046/#section-5.1.1
NOTE: The CRLF preceding the boundary delimiter line is conceptually
attached to the boundary so that it is possible to have a part that
does not end with a CRLF (line break). Body parts that must be
considered to end with line breaks, therefore, must have two CRLFs
preceding the boundary delimiter line, the first of which is part of
the preceding body part, and the second of which is part of the
encapsulation boundary.
Happy to send you a PR to fix this if that would be useful.
- Ngôn ngữ chính
- Java
- Star
- 38
- Fork
- 37
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 42
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/kiota-java
-
#1786 breaks compilation with Eclipse compilerCó thể đã có người làm @Bhumit267 đã nhận 14 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
microsoft/kiota-java#2000 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
upgrade to okhttp 5Có thể đã có người làm @ramsessanchez đã nhận 125 ngày trước. Đang mởenhancement help wanted
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
microsoft/kiota-java#1984 · 10 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Very old stax implementation causes Error in relation with quarkus and HibernateCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởNeeds: Attention :wave: type:question
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
microsoft/kiota-java#1928 · 6 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
http - implement body inspection handlerCó thể làm lại được @Nikk8091 đã nhận 77 ngày trước và không có pull request nào đang mở. Đang mởenhancement help wanted type:enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
microsoft/kiota-java#1685 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
microsoft/kiota-java#1612 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/kiota-java
Issue tương tự
-
area-templates triage:bot-seen triage:needs-human
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
microsoft/aspire#22356 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
apache/flink-agents#1395 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
floci-io/floci#8666 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
openhab/openhab-core#5992 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
quarkiverse/quarkiverse#476 ·
Maintainer thường phản hồi trong vòng 1 ngày