Issues

ZF2-69: exception 'Zend\Http\Exception\InvalidArgumentException' with message 'Invalid URI passed as string' in vendor/Zend/library/Zend/Http/Request.php:176

Description

While running tests with http client, i got this error, when browsing to urls which contain a "#". Seems like this was introduced in the last weeks, since it worked before updating today...

Let me know if you need some more infos...

Comments

I confirm, URI with fragment


$req = new \Zend\Http\Request();
$req->setUri('http://somedomain.com/base/base1/file.html#12');
echo $req, "\n";

raises exception

 
Fatal error: Uncaught exception 'Zend\Http\Exception\InvalidArgumentException' with message 'Invalid URI passed as string' in /home/devel/zf2-devel/zf2/library/Zend/Http/Request.php:177
Stack trace:
#0 /home/devel/zf2-devel/zf2/tmp/uri.php(6): Zend\Http\Request->setUri('http://somedoma...')
#1 {main}
  thrown in /home/devel/zf2-devel/zf2/library/Zend/Http/Request.php on line 177

without fragment


$req = new \Zend\Http\Request();
$req->setUri('http://somedomain.com/base/base1/file.html');
echo $req, "\n";

everything is fine

 
GET http://somedomain.com/base/base1/file.html HTTP/1.1

I tried the example and works well for me.