smoke.sh
smoke.sh copied to clipboard
Add insensive HTTP header check per RFC 2616
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.