belgif / rest-guide

REST Guidelines of Belgian government institutions
https://www.belgif.be/specification/rest/api-guide/
Apache License 2.0
24 stars 4 forks source link

HTTP headers must be handled in case-insensitive manner #103

Closed jpraet closed 2 months ago

jpraet commented 1 year ago

According to the spec, HTTP headers are case-insensitive.

The section REST guide section that covers HTTP headers should probably mention this?

Some middleware or tools can alter the casing of the HTTP headers, e.g. normalize them to lowercase. The application should therefore always treat HTTP headers in case-insensitive manner. e.g. in java: HttpServletRequest.getHeader(name) is OK, but watch out with methods like HttpServletRequest.getHeaderNames() because there it is your own responsibility to handle case-insensitivity.

pvdbosch commented 1 year ago

We could align with this zalando rule: http://opensource.zalando.com/restful-api-guidelines/#132

pvdbosch commented 1 year ago

WG agreed to align with Zalando's guideline. I'll work out a PR.

pvdbosch commented 1 year ago

created PR: https://github.com/belgif/rest-guide/pull/129