You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an action that proxies the current request by modifying the Uri in the original request and then sending it through Zend\Http\Client. However, the new Host header based on the Uri gets overwritten by the original Host header in the original request.
@dkmuir No, it will not. There are plenty of PSR-18 implementations already, and we see no reason to provide one ourselves. The primary use case for laminas-http was to provide HTTP messages for the MVC; the client has not had new features in many years, and offers nowhere near the functionality you'll find in most modern PHP HTTP clients.
Originally zendframework/zendframework#6101
I have an action that proxies the current request by modifying the Uri in the original request and then sending it through Zend\Http\Client. However, the new Host header based on the Uri gets overwritten by the original Host header in the original request.
Eg:
The request ends up being sent to http://example.com/proxy-target instead of http://target-site.com/proxy-target
The new host header gets set up in https://github.com/zendframework/zend-http/blob/master/src/Client.php#L1110
But then gets replaced with the header from the request here:
https://github.com/zendframework/zend-http/blob/master/src/Client.php#L1174
Shouldn't the new headers take precedence over the headers from the request?
Originally posted by @dkmuir at zendframework/zend-http#64
The text was updated successfully, but these errors were encountered: