Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Sources/HTTPTypes/HTTPFields.swift
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,12 @@ public struct HTTPFields: Sendable, Hashable {
/// let contentTypeValue = response.headerFields[.contentType]
/// ```
///
/// If multiple fields with the same name exist, they are concatenated with commas (or
/// semicolons in the case of the "Cookie" header field).
/// When reading, if multiple fields with the same name exist, their values are concatenated
/// with commas (or semicolons in the case of the "Cookie" header field).
///
/// When setting a value, all existing fields with the same name are replaced by a single
/// field with the new value, and setting `nil` removes them. Setting a value never appends
/// an additional field; to set multiple fields with the same name, use ``subscript(values:)``.
///
/// When setting a "Cookie" header field value, it is split into multiple "Cookie" fields by
/// semicolon.
Expand Down