File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/org/opensolaris/opengrok/web Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 38
38
import java .util .Arrays ;
39
39
import java .util .Collections ;
40
40
import java .util .EnumSet ;
41
- import java .util .HashSet ;
42
41
import java .util .List ;
43
42
import java .util .Set ;
44
43
import java .util .SortedSet ;
@@ -1173,11 +1172,21 @@ public File findDataFile() {
1173
1172
*/
1174
1173
public String getDirectoryRedirect () {
1175
1174
if (isDir ()) {
1175
+ getPrefix ();
1176
+ /**
1177
+ * Redirect /xref -> /xref/
1178
+ */
1179
+ if (prefix == Prefix .XREF_P
1180
+ && getUriEncodedPath ().isEmpty ()
1181
+ && !req .getRequestURI ().endsWith ("/" )) {
1182
+ return req .getContextPath () + Prefix .XREF_P + '/' ;
1183
+ }
1184
+
1176
1185
if (path .length () == 0 ) {
1177
1186
// => /
1178
1187
return null ;
1179
1188
}
1180
- getPrefix ();
1189
+
1181
1190
if (prefix != Prefix .XREF_P && prefix != Prefix .HIST_L
1182
1191
&& prefix != Prefix .RSS_P ) {
1183
1192
// if it is an existing dir perhaps people wanted dir xref
You can’t perform that action at this time.
0 commit comments