From f44fe0b2042924e3f0392febd8716bbcfc8f36a6 Mon Sep 17 00:00:00 2001 From: George Barnett Date: Sat, 11 Jan 2020 16:51:50 +0000 Subject: [PATCH] Fix documenation in HTTPHeaders. (#1335) Motivation: `subscript(name:)` and `first(name:)` incorrectly referred users to `getCanonicalForm` for a maximally decomposed list of header fields. This no longer exists. Modifications: Point users to `subscript(canonicalForm:)`. Result: More accurate documenation. --- Sources/NIOHTTP1/HTTPTypes.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/NIOHTTP1/HTTPTypes.swift b/Sources/NIOHTTP1/HTTPTypes.swift index 979a7e1ae..a305457e8 100644 --- a/Sources/NIOHTTP1/HTTPTypes.swift +++ b/Sources/NIOHTTP1/HTTPTypes.swift @@ -407,7 +407,7 @@ public struct HTTPHeaders: CustomStringConvertible, ExpressibleByDictionaryLiter /// returns them in their original representation: that means that a comma-separated /// header field list may contain more than one entry, some of which contain commas /// and some do not. If you want a representation of the header fields suitable for - /// performing computation on, consider `getCanonicalForm`. + /// performing computation on, consider `subscript(canonicalForm:)`. /// /// - Parameter name: The header field name whose values are to be retrieved. /// - Returns: A list of the values for that header field name. @@ -427,7 +427,7 @@ public struct HTTPHeaders: CustomStringConvertible, ExpressibleByDictionaryLiter /// but instead returns the first value from the original representation: that means /// that a comma-separated header field list may contain more than one entry, some of /// which contain commas and some do not. If you want a representation of the header fields - /// suitable for performing computation on, consider `getCanonicalForm`. + /// suitable for performing computation on, consider `subscript(canonicalForm:)`. /// /// - Parameter name: The header field name whose first value should be retrieved. /// - Returns: The first value for the header field name.