Skip to content

Commit 7a239c8

Browse files
CopilotMihaZupan
andcommitted
Document MultipartContent zero-part serialization behavior
Co-authored-by: MihaZupan <[email protected]>
1 parent d5aff91 commit 7a239c8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

xml/System.Net.Http/MultipartContent.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,14 @@
5252
</Attributes>
5353
<Docs>
5454
<summary>Provides a collection of <see cref="T:System.Net.Http.HttpContent" /> objects that get serialized using the multipart/* content type specification.</summary>
55-
<remarks>To be added.</remarks>
55+
<remarks>
56+
<format type="text/markdown"><![CDATA[
57+
58+
## Remarks
59+
According to RFC 1341 (MIME) 7.2 and its successors, multipart messages must contain one or more body parts. When a <xref:System.Net.Http.MultipartContent> 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.
60+
61+
]]></format>
62+
</remarks>
5663
</Docs>
5764
<Members>
5865
<MemberGroup MemberName=".ctor">

0 commit comments

Comments
 (0)