summaryrefslogtreecommitdiff
path: root/program/steps/utils
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2010-07-25 20:09:36 +0000
committerthomascube <thomas@roundcube.net>2010-07-25 20:09:36 +0000
commit52c0f7626c6bad1f27e0d5ff8199e4abdd427712 (patch)
tree2c8481eb583df598d19be981656c3f5056c015a4 /program/steps/utils
parent2fc4596587ce943026187037c223d126e750780f (diff)
Strip protocol from hostname in HTTP headers (#1486868)
Diffstat (limited to 'program/steps/utils')
-rw-r--r--program/steps/utils/spell_googie.inc2
-rw-r--r--program/steps/utils/spell_html_googie.inc2
2 files changed, 2 insertions, 2 deletions
diff --git a/program/steps/utils/spell_googie.inc b/program/steps/utils/spell_googie.inc
index d06a1a88a..9d47a51b4 100644
--- a/program/steps/utils/spell_googie.inc
+++ b/program/steps/utils/spell_googie.inc
@@ -46,7 +46,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";
diff --git a/program/steps/utils/spell_html_googie.inc b/program/steps/utils/spell_html_googie.inc
index ee9079dce..7a301b6ab 100644
--- a/program/steps/utils/spell_html_googie.inc
+++ b/program/steps/utils/spell_html_googie.inc
@@ -30,7 +30,7 @@ function googie_get($host, $port, $path, $data)
$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";