zendframework / zend-http

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

Zend\Http\Client should not accept relative URIs #170

Open thomasvargiu opened 5 years ago

thomasvargiu commented 5 years ago

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.

samsonasik commented 5 years ago

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

michalbundyra commented 5 years ago

@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?

weierophinney commented 4 years ago

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.