From: ggiunta Date: Sun, 23 May 2010 13:55:19 +0000 (+0000) Subject: - omit port on http 'Host' header if it is 80; X-Git-Tag: 3.0.0~22 X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=915b23d9a60b19901b5488f56c7d5439c5895983 - 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 --- 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 .