summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/utils/HttpUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/gitblit/utils/HttpUtils.java')
-rw-r--r--src/main/java/com/gitblit/utils/HttpUtils.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/utils/HttpUtils.java b/src/main/java/com/gitblit/utils/HttpUtils.java
index 2fd8d898..27df5a52 100644
--- a/src/main/java/com/gitblit/utils/HttpUtils.java
+++ b/src/main/java/com/gitblit/utils/HttpUtils.java
@@ -110,7 +110,9 @@ public class HttpUtils {
sb.append(host);
if (("http".equals(scheme) && port != 80)
|| ("https".equals(scheme) && port != 443)) {
- sb.append(":").append(port);
+ if (!host.endsWith(":" + port)) {
+ sb.append(":").append(port);
+ }
}
sb.append(context);
return sb.toString();