summaryrefslogtreecommitdiff
path: root/src/HttpRequest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/HttpRequest.cc')
-rw-r--r--src/HttpRequest.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc
index 95630abd..c1a7ae89 100644
--- a/src/HttpRequest.cc
+++ b/src/HttpRequest.cc
@@ -118,7 +118,11 @@ bool HttpRequest::isRangeSatisfied(const RangeHandle& range) const
std::string HttpRequest::getHostText(const std::string& host, uint16_t port) const
{
- return host+(port == 80 || port == 443 ? "" : ":"+Util::uitos(port));
+ std::string hosttext = host;
+ if(!(port == 80 || port == 443)) {
+ strappend(hosttext, ":", Util::uitos(port));
+ }
+ return hosttext;
}
std::string HttpRequest::createRequest()