Issue #3018637 by emilymoi, das-peter: [regression] Unset the 'host' header in drupal_http_request() during redirect

merge-requests/26/head
Pol Dellaiera 2019-01-24 14:31:28 +01:00
parent 80b00d1429
commit 4d0bb65dcd
1 changed files with 5 additions and 0 deletions

View File

@ -1094,6 +1094,11 @@ function drupal_http_request($url, array $options = array()) {
elseif ($options['max_redirects']) {
// Redirect to the new location.
$options['max_redirects']--;
// We need to unset the 'Host' header
// as we are redirecting to a new location.
unset($options['headers']['Host']);
$result = drupal_http_request($location, $options);
$result->redirect_code = $code;
}