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

Add insensive HTTP header check per RFC 2616 #23

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

Conversation

pjmolina
Copy link

@pjmolina pjmolina commented Oct 8, 2021

Per RFC 2616: header names are case insensitive, so the check:

smoke_assert_headers "content-type: application/json; charset=utf-8"

should succeed when server returns the header names in any of these ways:
Content-Type: application/json; charset=utf-8
content-type: application/json; charset=utf-8
CoNTEnT-type: application/json; charset=utf-8
etc...

Room for improvement:
The current implementation and the proposed fix is not splitting the header from the value.
So header value should be checked for differences in upper/lower case.

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