Issue #3018637 by emilymoi, das-peter: [regression] Unset the 'host' header in drupal_http_request() during redirect
parent
80b00d1429
commit
4d0bb65dcd
|
@ -1094,6 +1094,11 @@ function drupal_http_request($url, array $options = array()) {
|
||||||
elseif ($options['max_redirects']) {
|
elseif ($options['max_redirects']) {
|
||||||
// Redirect to the new location.
|
// Redirect to the new location.
|
||||||
$options['max_redirects']--;
|
$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 = drupal_http_request($location, $options);
|
||||||
$result->redirect_code = $code;
|
$result->redirect_code = $code;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue