Please enable Javascript to view the contents

 ·  ☕ 1 分钟

Header case

https://datatracker.ietf.org/doc/html/rfc7540#section-8.1.2

8.1.2. HTTP Header Fields

HTTP header fields carry information as a series of key-value pairs.
For a listing of registered HTTP headers, see the “Message Header
Field” registry maintained at <https://www.iana.org/assignments/
message-headers>.

Just as in HTTP/1.x, header field names are strings of ASCII characters that are compared in a case-insensitive fashion. However, header field names MUST be converted to lowercase prior to their encoding in HTTP/2. A request or response containing uppercase header field names MUST be treated as malformed (Section 8.1.2.6](https://datatracker.ietf.org/doc/html/rfc7540#section-8.1.2.6)).

Ref. https://blog.yaakov.online/http-2-header-casing/

分享

Mark Zhu
作者
Mark Zhu
An old developer