Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headers are case-sensitive #19

Open
danpalmer opened this issue Oct 9, 2022 · 2 comments
Open

Headers are case-sensitive #19

danpalmer opened this issue Oct 9, 2022 · 2 comments

Comments

@danpalmer
Copy link

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.

@OrkhanAlikhanov
Copy link
Member

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.

@danpalmer
Copy link
Author

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants