zendframework / zend-diactoros

PSR-7 HTTP Message implementation
BSD 3-Clause "New" or "Revised" License
1.55k stars 152 forks source link

Bugfix: Header with value "0" is being discarded #344

Closed malukenho closed 5 years ago

malukenho commented 5 years ago

Linking #342

weierophinney commented 5 years ago

Thanks, @malukenho!

tptrixtop commented 5 years ago

This fix cause an issue in apache on win, because there is a header

[SERVER_SIGNATURE] =><address>Apache/2.4.34 (Win32) OpenSSL/1.1.0i PHP/7.2.9 Server at api.best-office.local Port 8080</address>

That contains not "secured" data and it throws an exception and drop down our prod environment. It was really hard to find the root cause.

And not only on windows(our prod env is debian lamp server)

vakata commented 5 years ago

This is not a proper fix - all server vars are copied as headers, which is incorrect. The problem users are reporting is when some of the server values can not be used as headers. This should probably be reverted and a simple strlen($val) check added in its place.

froschdesign commented 5 years ago

@vakata Please look #349 and add your comment there. Thanks!