Skip to content

Commit 8f72fb2

Browse files
committed
simplify link creation
1 parent 9642a50 commit 8f72fb2

File tree

1 file changed

+10
-10
lines changed
  • opengrok-web/src/main/webapp

1 file changed

+10
-10
lines changed

opengrok-web/src/main/webapp/rss.jsp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,16 @@ org.opengrok.web.PageConfig"
8787
String replaced = entry.getMessage().split("\n")[0];
8888
%><%= Util.htmlize(entry.getRevision()) %> - <%= Util.htmlize(replaced) %></title>
8989
<link><%
90-
String requestURL = request.getScheme() + "://";
91-
String serverName = cfg.getServerName();
92-
requestURL += serverName;
93-
String port = Integer.toString(request.getLocalPort());
94-
if (!port.isEmpty()) {
95-
requestURL += ":" + port;
96-
}
97-
98-
requestURL += Util.uriEncodePath(request.getContextPath());
99-
requestURL += Prefix.HIST_L + Util.uriEncodePath(cfg.getPath()) + "#" + Util.uriEncode(entry.getRevision());
90+
String requestURL = request.getScheme() +
91+
"://" +
92+
cfg.getServerName() +
93+
":" +
94+
request.getLocalPort() +
95+
Util.uriEncodePath(request.getContextPath()) +
96+
Prefix.HIST_L +
97+
Util.uriEncodePath(cfg.getPath()) +
98+
"#" +
99+
Util.uriEncode(entry.getRevision());
100100
%><%= requestURL %></link>
101101
<description><%
102102
for (String e : entry.getMessage().split("\n")) {

0 commit comments

Comments
 (0)