zendframework / zend-http

Http component from Zend Framework
BSD 3-Clause "New" or "Revised" License
134 stars 85 forks source link

empty header values in responses are breaking the application since version 2.10.1 #202

Closed BigMichi1 closed 4 years ago

BigMichi1 commented 4 years ago

Provide a narrative description of what you are trying to accomplish.

Code to reproduce the issue

since the update from version 2.10.0 to 2.10.1 (only this package changed) i receive this error Zend\Diactoros\Exception\InvalidArgumentException: Invalid header value type; must be a string or numeric; received NULL when i'm using the geocoder module. i tracked it down to this request that is sent: https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/find?text=Alexanderplatz%2C+Berlin&sourceCountry=DEU&maxLocations=1&f=json&outFields=*

in the response the header field for Server is empty, see: Screenshot_20191203_101956

Expected results

should not fail on empty header values, like it was in version 2.10.0

Actual results

request are failing because of the response contains an empty header value

michalbundyra commented 4 years ago

@BigMichi1 Thanks for reporting. I would need more details. Exception from Diactoros is not helpful, as zend-http doesn't have that dependency and it must be somewhere in your project.

weierophinney commented 4 years ago

@BigMichi1 Are you using zend-psr7bridge by any chance?

BigMichi1 commented 4 years ago

i'm using also zendframework/zend-psr7bridge 1.2.0 PSR-7 <-> zend-http message conversions thats right, the issue is before updating zend-http to 2.10.1 it works with version 2.10.0

michalbundyra commented 4 years ago

@BigMichi1 Version 2.11.1 with the hotfix has been released. Thanks for reporting the issue!