From 52c0f7626c6bad1f27e0d5ff8199e4abdd427712 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Sun, 25 Jul 2010 16:09:36 -0400 Subject: [PATCH] Strip protocol from hostname in HTTP headers (#1486868) --- program/steps/utils/spell_googie.inc | 2 +- program/steps/utils/spell_html_googie.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/program/steps/utils/spell_googie.inc b/program/steps/utils/spell_googie.inc index d06a1a8..9d47a51 100644 --- a/program/steps/utils/spell_googie.inc +++ b/program/steps/utils/spell_googie.inc @@ -46,7 +46,7 @@ if ($fp = fsockopen($host, $port, $errno, $errstr, 30)) { $out = "POST $path HTTP/1.0\r\n"; - $out .= "Host: $host\r\n"; + $out .= "Host: " . str_replace('ssl://', '', $host) . "\r\n"; $out .= "Content-Length: " . strlen($data) . "\r\n"; $out .= "Content-Type: application/x-www-form-urlencoded\r\n"; $out .= "Connection: Close\r\n\r\n"; diff --git a/program/steps/utils/spell_html_googie.inc b/program/steps/utils/spell_html_googie.inc index ee9079d..7a301b6 100644 --- a/program/steps/utils/spell_html_googie.inc +++ b/program/steps/utils/spell_html_googie.inc @@ -30,7 +30,7 @@ $store = ''; if ($fp = fsockopen($host, $port, $errno, $errstr, 30)) { $out = "POST $path HTTP/1.0\r\n"; - $out .= "Host: $host\r\n"; + $out .= "Host: " . str_replace('ssl://', '', $host) . "\r\n"; $out .= "Content-Length: " . strlen($data) . "\r\n"; $out .= "Content-Type: application/x-www-form-urlencoded\r\n"; $out .= "Connection: Close\r\n\r\n"; -- Gitblit v1.9.1