Skip to content

Documentation fix - Mux Signature with wrong casing #63

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

Merged
merged 1 commit into from
Aug 31, 2020

Conversation

iamvajid
Copy link
Contributor

Not sure if it was intentionally kept so in the documentation, feel free to reject if so. The example below was correct, but the explanation used capital casing which won't be a valid header Node/Express

Fix documentation
@dylanjha
Copy link
Collaborator

@iamvajid thanks for pointing this out.

The key for the header on the request is Mux-Signature. I want to be clear about that. But I think express downcases all the headers automatically, is that true?

@iamvajid
Copy link
Contributor Author

iamvajid commented Aug 24, 2020

Yes @dylanjha , in express, the headers comes in lower-case, but i doubt if its express doing it. Looks like its the underlying http module of node.js as seen here nodejs/node-v0.x-archive#1954. And it seems the spec mentions that headers are case-insensitive (Ref: https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html). So ideally, the comparison itself should be ignoring the case, which could be the reason why http module was implemented like this

@iamvajid
Copy link
Contributor Author

Just wanted to mention that i double-checked and confirmed that its the behaviour of node and not just express

@dylanjha dylanjha merged commit 5b31d42 into muxinc:master Aug 31, 2020
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

Successfully merging this pull request may close these issues.

2 participants