Why does the first letter of the header key become uppercase when I use an HTTP trigger to invoke a function?

更新时间:
复制 MD 格式

When you use an HTTP trigger to invoke a function running in a built-in runtime, Function Compute 3.0 converts the incoming HTTP request into the event format of the HTTP trigger. During this conversion, all header keys are normalized using Go's net/http standard library: the first letter and each letter following a hyphen are capitalized.

For example, accept-encoding becomes Accept-Encoding.

This behavior is consistent with HTTP specifications, which treat header keys as case-insensitive.