uROIndyHTTPChannel host in http header with port 0


We had some complaints from customers who’s reverse proxy gave an error on our request (i’ve changed the hostname):
AH00550: Client sent malformed Host header: talk.remobjects.com:0
We are connecting to talk.remobjects.com:443.

So after debugging the whole thing I found that after connecting the host is changed. I think it’s because the default ports (443 or 80) are stripped from the url (by Indy?). After connecting TROIndyHTTPChannel.IntSetTargetURI is executed with the correct host name but with port 0.

So I changed the code in uROIndyHTTPChannel.pas line 224 from:
IndyClient.Request.Host := aUri.Host + ':'+ IntToStr(aUri.Port);

if aUri.Port>0 then
IndyClient.Request.Host := aUri.Host + ':'+ IntToStr(aUri.Port)
IndyClient.Request.Host := aUri.Host;

I’ve tested the change locally when I’ve tested the change in the live environment I’ll post it here.

(I could nog add tags because of an internal server error)

Thanks, logged as bugs://83523

bugs://83523 got closed with status fixed.