From 681151e9b941fe07e7835ff861073a5ad9a3dad3 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Thu, 26 Jan 2017 21:56:21 +0100 Subject: [PATCH] Fixed http_client EiffelNet implementation when port is not the default one. - previously the client was not sending the complete `host:port` but only `host` as `host` http header. --- .../src/spec/net/net_http_client_request.e | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/library/network/http_client/src/spec/net/net_http_client_request.e b/library/network/http_client/src/spec/net/net_http_client_request.e index 6269c682..cc344763 100644 --- a/library/network/http_client/src/spec/net/net_http_client_request.e +++ b/library/network/http_client/src/spec/net/net_http_client_request.e @@ -257,7 +257,16 @@ feature -- Access s.append (h_host) else s.append (l_host) - end + if l_is_https then + if l_port /= 443 then + s.append_character (':') + s.append_integer (l_port) + end + elseif l_port /= 80 then + s.append_character (':') + s.append_integer (l_port) + end + end s.append (http_end_of_header_line) if not headers.has ("Connection") then if l_is_http_1_0_request then