yiisoft / yii2

Yii 2: The Fast, Secure and Professional PHP Framework
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
14.24k stars 6.9k forks source link

PageCache storing headers in lower format #19185

Closed nadar closed 2 years ago

nadar commented 2 years ago

We are using PageCache to cache a REST response, it seems that headers are always returned as lowercase chars afterwards, but the original input is case sensitive.

https://github.com/yiisoft/yii2/blob/master/framework/filters/PageCache.php#L281

Whats the reason for this behavior? The default active data provider headers are f.e X-Pagination-Page-Count but when cached it returns x-pagination-total-count afterwards.

samdark commented 2 years ago

https://github.com/yiisoft/yii2/commit/ac623ab8f6004f26d1668234a22d562ece1b3df2 can't remember exact reason for it.