From 23deadec716a8c24a7e34d316bff5e84d4226a64 Mon Sep 17 00:00:00 2001 From: Denis Feklushkin Date: Sat, 10 Aug 2019 14:10:13 +0700 Subject: [PATCH] Comment moved to suitable place Space ommited --- http/vibe/http/client.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http/vibe/http/client.d b/http/vibe/http/client.d index df64459faa..e12d6bb411 100644 --- a/http/vibe/http/client.d +++ b/http/vibe/http/client.d @@ -147,10 +147,10 @@ private void httpRequesterDg(scope HTTPClientRequest req, in URL url, in HTTPCli if (settings.proxyURL.schema !is null) req.requestURL = url.toString(); // proxy exception to the URL representation - // Provide port number when it is not the default one (RFC2616 section 14.23) // IPv6 addresses need to be put into brackets auto hoststr = url.host.canFind(':') ? "["~url.host~"]" : url.host; + // Provide port number when it is not the default one (RFC2616 section 14.23) if (url.port && url.port != url.defaultPort) req.headers["Host"] = format("%s:%d", hoststr, url.port); else @@ -159,7 +159,7 @@ private void httpRequesterDg(scope HTTPClientRequest req, in URL url, in HTTPCli if ("authorization" !in req.headers && url.username != "") req.addBasicAuth(url.username, url.password); - if (requester) () @trusted{ requester(req); } (); + if (requester) () @trusted { requester(req); } (); } /** Posts a simple JSON request. Note that the server www.example.org does not