-
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 |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 7 replies
-
ac623ab can't remember exact reason for it. |
Beta Was this translation helpful? Give feedback.
-
We are describing the headers in an openapi file, so this leaves us in a bad situation, because the header names changes after caching :-) |
Beta Was this translation helpful? Give feedback.
-
In the mentioned commit we can see:
|
Beta Was this translation helpful? Give feedback.
-
I can see that Symfony is lowercasing the headers for processing purposes but keeping them as-is when resending. |
Beta Was this translation helpful? Give feedback.
-
I'm looking into this and looks like we could store original header name along the normalized ones but I've got one question - if you are storing the same (case-sensitive wise) header several times just under the different case-style which one should be stored as a not normalized name? I would say the last one. |
Beta Was this translation helpful? Give feedback.
We are describing the headers in an openapi file, so this leaves us in a bad situation, because the header names changes after caching :-)