As per RFC 2616 Section 4.2 HTTP headers should be case-insensitive. Some of the internal functions, such as curl_setopt() modify headers using their canonical name, such as Content-Type, Cookie, Referer, etc. However, using a canonical name might not always work properly, if the client has set a header name in the lower case, such as content-type, referer or upper case CONTENT-TYPE, COOKIE or any other mixture of letter casing. In order to fix this problem a new mapping beetwen the lower case header name representation and the actual header name is introduced and is now used when performing any header manipulations.
As per RFC 2616 Section 4.2 HTTP headers should be case-insensitive. Some of the internal functions, such as
curl_setopt()
modify headers using their canonical name, such asContent-Type
,Cookie
,Referer
, etc. However, using a canonical name might not always work properly, if the client has set a header name in the lower case, such ascontent-type
,referer
or upper caseCONTENT-TYPE
,COOKIE
or any other mixture of letter casing. In order to fix this problem a new mapping beetwen the lower case header name representation and the actual header name is introduced and is now used when performing any header manipulations.Fixes swoole/swoole-src#3850