httpsend.pas - fixed - do not add default port numbers for http or https protocols into Host header.

git-svn-id: https://svn.code.sf.net/p/synalist/code/trunk@170 7c85be65-684b-0410-a082-b2ed4fbef004
This commit is contained in:
geby 2012-12-13 18:05:47 +00:00
parent 77f6365bd3
commit 15577c3625

View File

@ -1,5 +1,5 @@
{==============================================================================|
| Project : Ararat Synapse | 003.012.007 |
| Project : Ararat Synapse | 003.012.008 |
|==============================================================================|
| Content: HTTP client |
|==============================================================================|
@ -478,10 +478,12 @@ begin
s := '[' + Host + ']'
else
s := Host;
if FAddPortNumberToHost and (Port <> '80') then
FHeaders.Insert(0, 'Host: ' + s + ':' + Port)
if FAddPortNumberToHost
and (((Port <> '80') and (UpperCase(Prot) = 'HTTP'))
or ((Port <> '443') and (UpperCase(Prot) = 'HTTPS'))) then
FHeaders.Insert(0, 'Host: ' + s + ':' + Port)
else
FHeaders.Insert(0, 'Host: ' + s);
FHeaders.Insert(0, 'Host: ' + s);
if UsingProxy then
URI := Prot + '://' + s + ':' + Port + URI;
if URI = '/*' then