Skip to content

Commit

Permalink
Merge pull request gitblit-org#1201 from j123b567/bug/1114
Browse files Browse the repository at this point in the history
Fix gitblit-org#1114 HttpUtils getGitblitURL does not support nonstandard ports
  • Loading branch information
gitblit authored Feb 16, 2017
2 parents b03fc53 + 49bec41 commit d54dc04
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/gitblit/utils/HttpUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ public static String getGitblitURL(HttpServletRequest request) {
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();
Expand Down

0 comments on commit d54dc04

Please sign in to comment.