This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
Requests with integer header keys and string values cause InvalidArgumentExceptions #197
Open
2 tasks done
If a user sends a GET request to an endpoint which is run on
zend-http
and if that GET request has a headerkey:value
pair of the form$integer:$string
, (e.g.,2:blah)
, this will cause the endpoint to throw anInvalidArgumentException
.This appears to be similar to #116 and zendframework/zend-mvc#226 but not quite the same.
Code to reproduce the issue
I don't have a specific code snippet to reproduce this (it affects our entire application) but this seems to be happening because, in
zend-http/src/Headers.php
,addHeaders()
can calladdHeaderLine()
without a second argument if it sees a header with an integer key:Expected results
I'm not sure. Perhaps the header should be ignored? Or that
addHeaderLine()
should look like$this->addHeaderLine((string)$name, $value);
?Actual results
The text was updated successfully, but these errors were encountered: