Skip to content

Add insensive HTTP header check per RFC 2616#23

Open
pjmolina wants to merge 1 commit intoasm89:masterfrom
pjmolina:fix/insensitive-header-names
Open

Add insensive HTTP header check per RFC 2616#23
pjmolina wants to merge 1 commit intoasm89:masterfrom
pjmolina:fix/insensitive-header-names

Conversation

@pjmolina
Copy link
Copy Markdown

@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