Skip to content

Make http headers case-insensitive #94

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

michaelPotter
Copy link

Hi,

I was running into an issue where I was trying to set the content-type header to x-www-form-urlencoded, but VRC was sending TWO content-type headers, one with my value, and one with type json.

It looks like internally the default content-type is json and is set with the key "Content-Type". When I set the "content-type" header, the default wasn't being overridden because it uses a different case.

This PR makes all http headers lowercase upon processing so that you can't send multiple of the same header. Note that http headers are case-insensitive in the spec. https://stackoverflow.com/a/5259004

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.

1 participant