- Published on
HTML Header Fields/Keys are Case Insensitive
- Authors
- Name
- Yair Mark
- @yairmark
Today while working with custom HTML headers I realised that the header key is case insensitive. So for example if you have a custom field called SOME_CUSTOM_ATTRIBUTE
with value blah
it is the same as Some_Custom_Attribute
and even any permutation of upper and lower case letters SoMe_CuSTOm_aTTRibUte
. The details of this can be found here in the RFC:
Each header field consists of a case-insensitive field name followed by a colon (":"), optional leading whitespace, the field value, and optional trailing whitespace.