smoke.sh icon indicating copy to clipboard operation
smoke.sh copied to clipboard

Add insensive HTTP header check per RFC 2616

Open pjmolina opened this issue 2 years ago • 0 comments

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.

pjmolina avatar Oct 08 '21 11:10 pjmolina