Http.swift
Http.swift copied to clipboard
Headers are case-sensitive
In HTTP, headers are case in-sensitive, however Http.swift treats them as case-sensitive.
This means, for example, when sending a POST
to an Http.swift server with a content-length
header, no body is read because Http.swift looks for Content-Length
. Many clients, including fetch
, use lower-case header names.
Hello, that's unfortunately right. I missed the case sensitivity part from rfc. I have no workarounds to provide. You can try other swift http server libraries in the ecosystem.
Thanks for taking a look. I ended up moving to Vapor, but for a small embedded server in a bigger app it's very heavy-weight and not well suited. I think there's a place for a smaller and lighterweight library like this in the ecosystem :)