FriendsOfSymfony/FOSHttpCache — pull request #128 by lolautruche (2014-10-07 15:45:28+00:00)
Title: Fix Host header for proxy client requests

When using `ban` requests with Varnish proxy client, requests are queued and sent with `flush()`. Queued requests are registered without host, making Guzzle create an empty `Host` header.

When flushing, Guzzle request is re-created starting with the original one (so without host), with all registered headers. The problem is that the empty `Host` header is also copied, and thus not re-created by Guzzle with the server URL. In the backend, cURL sees it and takes it into account, overriding passed URL silently.

This causes requests with empty host being fired by Guzzle, which is kind of annoying :smiley:.

This patch ensures `Host` header is removed before sending the real request.