Issue # by mikeytown2: remove host header on a redirect. 7.x-1.2
authormikeytown2
Tue, 18 Oct 2011 01:44:42 +0000 (18:44 -0700)
committermikeytown2
Tue, 18 Oct 2011 01:44:42 +0000 (18:44 -0700)
httprl.module

index 0d9aa91..d6483ba 100755 (executable)
@@ -646,6 +646,8 @@ function httprl_parse_data(&$result) {
         // TODO: Parse cookies from header and send them in the redirect request.
         $result->options['max_redirects']--;
         $result->options['headers']['Referer'] = $result->url;
+        // Remove the host from the header.
+        unset($result->options['headers']['Host']);
         httprl_request($location, $result->options);
         $result->redirect_code[] = $code;
       }