From d5aff91fa7bfce41b7b79879e7899016e41b0541 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 4 Nov 2025 16:19:00 +0000 Subject: [PATCH 1/6] Initial plan From 7a239c8111666b59767b797cb1b480b3481a0890 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 4 Nov 2025 16:24:33 +0000 Subject: [PATCH 2/6] Document MultipartContent zero-part serialization behavior Co-authored-by: MihaZupan <25307628+MihaZupan@users.noreply.github.com> --- xml/System.Net.Http/MultipartContent.xml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xml/System.Net.Http/MultipartContent.xml b/xml/System.Net.Http/MultipartContent.xml index 396d5496c45..c428eb4cb2e 100644 --- a/xml/System.Net.Http/MultipartContent.xml +++ b/xml/System.Net.Http/MultipartContent.xml @@ -52,7 +52,14 @@ Provides a collection of objects that get serialized using the multipart/* content type specification. - To be added. + + instance with zero parts is serialized, it's written as a single dummy empty part with no content headers or message body. This ensures compliance with the RFC requirement while maintaining backward compatibility. However, other HTTP clients might not interpret this message as a multipart content with zero parts, so it's recommended to add at least one part before serializing. + + ]]> + From 068437d3dda69ae91ffae395bcdf33e004b3863d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 4 Nov 2025 16:26:18 +0000 Subject: [PATCH 3/6] Remove trailing whitespace from documentation Co-authored-by: MihaZupan <25307628+MihaZupan@users.noreply.github.com> --- xml/System.Net.Http/MultipartContent.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xml/System.Net.Http/MultipartContent.xml b/xml/System.Net.Http/MultipartContent.xml index c428eb4cb2e..f86642d4b28 100644 --- a/xml/System.Net.Http/MultipartContent.xml +++ b/xml/System.Net.Http/MultipartContent.xml @@ -53,11 +53,11 @@ Provides a collection of objects that get serialized using the multipart/* content type specification. - instance with zero parts is serialized, it's written as a single dummy empty part with no content headers or message body. This ensures compliance with the RFC requirement while maintaining backward compatibility. However, other HTTP clients might not interpret this message as a multipart content with zero parts, so it's recommended to add at least one part before serializing. - + instance with zero parts is serialized, it's written as a single dummy empty part with no content headers or message body. This ensures compliance with the RFC requirement while maintaining backward compatibility. However, other HTTP clients might not interpret this message as a multipart content with zero parts, so it's recommended to add at least one part before serializing. + ]]> From 7bdeb66165f3312b84847ecf5eb459a2931a25e7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 4 Nov 2025 16:27:47 +0000 Subject: [PATCH 4/6] Remove extra space before closing format tag Co-authored-by: MihaZupan <25307628+MihaZupan@users.noreply.github.com> --- xml/System.Net.Http/MultipartContent.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Net.Http/MultipartContent.xml b/xml/System.Net.Http/MultipartContent.xml index f86642d4b28..4fa2a4478f3 100644 --- a/xml/System.Net.Http/MultipartContent.xml +++ b/xml/System.Net.Http/MultipartContent.xml @@ -58,7 +58,7 @@ ## Remarks According to RFC 1341 (MIME) 7.2 and its successors, multipart messages must contain one or more body parts. When a instance with zero parts is serialized, it's written as a single dummy empty part with no content headers or message body. This ensures compliance with the RFC requirement while maintaining backward compatibility. However, other HTTP clients might not interpret this message as a multipart content with zero parts, so it's recommended to add at least one part before serializing. - ]]> +]]> From fe5447f609763afe4b31e10aee6c378bcabab4f3 Mon Sep 17 00:00:00 2001 From: Miha Zupan Date: Tue, 4 Nov 2025 18:14:36 +0100 Subject: [PATCH 5/6] Apply suggestion from @MihaZupan --- xml/System.Net.Http/MultipartContent.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xml/System.Net.Http/MultipartContent.xml b/xml/System.Net.Http/MultipartContent.xml index 4fa2a4478f3..5f79adac8e4 100644 --- a/xml/System.Net.Http/MultipartContent.xml +++ b/xml/System.Net.Http/MultipartContent.xml @@ -56,7 +56,8 @@ instance with zero parts is serialized, it's written as a single dummy empty part with no content headers or message body. This ensures compliance with the RFC requirement while maintaining backward compatibility. However, other HTTP clients might not interpret this message as a multipart content with zero parts, so it's recommended to add at least one part before serializing. +Multipart messages must contain one or more body parts. When a instance with zero parts is serialized, it's written as a single empty part with no content headers or message body. +If your server does not support such contents with zero parts, consider conditionally using a different or no `HttpContent`. ]]> From 45fc75f7209559f0e57fcca0759ef06f1643e218 Mon Sep 17 00:00:00 2001 From: Miha Zupan Date: Thu, 6 Nov 2025 21:08:15 +0100 Subject: [PATCH 6/6] Update xml/System.Net.Http/MultipartContent.xml Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- xml/System.Net.Http/MultipartContent.xml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/xml/System.Net.Http/MultipartContent.xml b/xml/System.Net.Http/MultipartContent.xml index 5f79adac8e4..09558f5679f 100644 --- a/xml/System.Net.Http/MultipartContent.xml +++ b/xml/System.Net.Http/MultipartContent.xml @@ -53,13 +53,8 @@ Provides a collection of objects that get serialized using the multipart/* content type specification. - instance with zero parts is serialized, it's written as a single empty part with no content headers or message body. -If your server does not support such contents with zero parts, consider conditionally using a different or no `HttpContent`. - -]]> +Multipart messages must contain one or more body parts. When a instance with zero parts is serialized, it's written as a single empty part with no content headers or message body. +If your server doesn't support such contents with zero parts, consider conditionally using a different type or no .