mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-25 04:47:50 +00:00
Motivation: When getting the canonical form of header values any ascii whitespace is stripped from the values. The current implementation does this by doing equality checks on Character and dropping them from a Substring. Modifications: - Update the Substring._trimWhitespace() function to trim on a UTF8 view - Add test Result: Retrieving the canonical form of header values is cheaper, significantly so when values contain a lot of leading or trailing whitespace.