mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-24 04:38:00 +00:00
Motivation: When getting the canonical form of headers we check whether the header name is 'set-cookie' to avoid splitting values which are not safe to split. This check is done against a `lowercased()` version of the header name. However, we don't need to produce a new `String` here as we already have a case insensitive string comparision function. Modifications: - Add a test to verify that getting the canonical form of "set-cookie" does not split any header values - Switch to `isEqualCaseInsensitiveASCIIBytes` Result: More tests, cheaper comparision.