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

Bug: Custom headers modified to lower case #258

Open
jindraf opened this issue Oct 19, 2022 · 2 comments
Open

Bug: Custom headers modified to lower case #258

jindraf opened this issue Oct 19, 2022 · 2 comments

Comments

@jindraf
Copy link

jindraf commented Oct 19, 2022

Custom headers names are modified to lower case by RESTED plugin. For instance, if I set "Authorization" text as a key of header, the server receives "authorization" (checked in browser devel tools). Servers strictly requesting "Authorization" are than failing with deny access.

Accept: /
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
authorization: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
test: xxxxxxx
DNT: 1
Connection: keep-alive
Cookie: PHPSESSID=xxxxxxxxxxxxxxxxxxxxxx
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
Pragma: no-cache
Cache-Control: no-cache

@kudlav
Copy link

kudlav commented Jan 13, 2023

Header names are case-insensitive. Modification may be done both by browser or server you should never rely on the case.
https://www.rfc-editor.org/rfc/rfc7230#section-3.2

@jindraf
Copy link
Author

jindraf commented Jan 15, 2023

Clear. Ok, this isn't a bug. Anyway. It is not cool that the plugin is changing the case. I see it as unexpected behavior. The result is that users cannot use RESTED client with not strictly correct servers. User/client without direct access to the server (to fix it), has to look for another plugin to use.

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