Skip to content

Commit

Permalink
Comment moved to suitable place
Browse files Browse the repository at this point in the history
Space ommited
  • Loading branch information
denizzzka committed Aug 10, 2019
1 parent c58ec21 commit 23deade
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions http/vibe/http/client.d
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 23deade

Please sign in to comment.