From 915b23d9a60b19901b5488f56c7d5439c5895983 Mon Sep 17 00:00:00 2001 From: ggiunta Date: Sun, 23 May 2010 13:55:19 +0000 Subject: [PATCH] - omit port on http 'Host' header if it is 80; git-svn-id: https://svn.code.sf.net/p/phpxmlrpc/code/trunk/xmlrpc@75 013ecfd8-0664-425d-a759-9c98391dc3f9 --- lib/xmlrpc.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/xmlrpc.inc b/lib/xmlrpc.inc index 36ea008..5deade3 100644 --- a/lib/xmlrpc.inc +++ b/lib/xmlrpc.inc @@ -1349,9 +1349,12 @@ $cookieheader = 'Cookie:' . $version . substr($cookieheader, 0, -1) . "\r\n"; } + // omit port if 80 + $port = ($port == '80') ? '' : (':' . $port); + $op= 'POST ' . $uri. " HTTP/1.0\r\n" . 'User-Agent: ' . $this->user_agent . "\r\n" . - 'Host: '. $server . ':' . $port . "\r\n" . + 'Host: '. $server . $port . "\r\n" . $credentials . $proxy_credentials . $accepted_encoding . -- 2.43.0