I am unsure what you mean, Anton. Woody pointed at tests for PSR-17 while I pointed at tests for PSR-7, they test implementations of different interfaces and you should use the one that matches the interface you are implementing.
They are also not my tests. I have actually contributed more code to the tests Woody linked than to the ones I linked, including an outstanding PR about a weird under-specified issue with PSR-17 as it relates to streams (a discussion Woody has also previously been involved with). So I am not sure this is a me vs Woody’s team situation 😉
To get back to your original email though: according to the PSR-7 definition of getHeaders it should not change the original case used to define the headers. To quote:
While header names are not case-sensitive, getHeaders() will preserve the exact case in which headers were originally specified.
I would love to see a test for that added to the PSR-7 test suite I linked, so all the big PSR-7 implementations can be tested against the case you mentioned to see how they handle it. There is no test for this that I could find at a cursory glance. I would expect PSR-7 to mean it would result in ['Foo' => ['...'], 'foo' => ['...']].
On Monday, 30 September 2019 09:15:37 UTC+2, Anton Fedonjuk wrote:
Sorry but your tests bad wrong, see Woody solution - his team fix all u bugs year ago.
понедельник, 30 сентября 2019 г., 7:04:47 UTC+3 пользователь Martijn van der Ven написал: