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 #19187

Closed samdark closed 2 years ago

samdark commented 2 years ago

Discussed in https://github.com/yiisoft/yii2/discussions/19186

Originally posted by **nadar** January 23, 2022 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.
nadar commented 2 years ago

Thanks @bizley, very nice!