[swift-server-dev] Convert HTTPVersion to struct

Helge Heß me at helgehess.eu
Wed Jun 14 09:55:03 CDT 2017


On 14 Jun 2017, at 16:50, Samuel Kallner <KALLNER at il.ibm.com> wrote:
> HTTPVersion should not be represented as a String as it doesn't have String semantics. It has the semantics of a pair of numbers (i.e. 2.12 > 2.2)

Content-Length should not be represented as a String as it doesn’t have String semantics. It has the semantic of a single number.

Content-Type should not be represented as a String as it doesn’t have String semantics. It has the semantic of a MIME type.

etc.

My comment was about double standards. If we represent headers as String, method and other stuff can be strings too. As mentioned I’d actually prefer specific types for known headers (not just for typing but also for performance, necessary in practice or not :-) ).

hh

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.swift.org/pipermail/swift-server-dev/attachments/20170614/3792f505/attachment.sig>


More information about the swift-server-dev mailing list