zend-http icon indicating copy to clipboard operation
zend-http copied to clipboard

Zend\Http\Client should not accept relative URIs

Open thomasvargiu opened this issue 6 years ago • 3 comments

I saw a new PR (#149) to resolve an issue (#36) with relative URIs. But as a @samsonasik said in a comment, relative URI's should not be used.

No adapters can actually work when no host is found in the URI, and logically I think it would be useless.

I think #149 should be reverted, adding a check in setUri() method to check if it contains the host parameter.

thomasvargiu avatar Jan 17 '19 17:01 thomasvargiu

relative URI seems ok, but I think next todo is prepend the existing host when request sent

samsonasik avatar Jan 17 '19 21:01 samsonasik

@samsonasik

relative URI seems ok, but I think next todo is prepend the existing host when request sent

how do you mean? From where we can get the host if it was not set with the uri?

michalbundyra avatar Sep 27 '19 12:09 michalbundyra

This repository has been closed and moved to laminas/laminas-http; a new issue has been opened at https://github.com/laminas/laminas-http/issues/3.

weierophinney avatar Dec 31 '19 22:12 weierophinney