summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/04_releases.mkd1
-rw-r--r--src/com/gitblit/wicket/pages/RepositoryPage.java10
2 files changed, 9 insertions, 2 deletions
diff --git a/docs/04_releases.mkd b/docs/04_releases.mkd
index da1af63c..e94d8c15 100644
--- a/docs/04_releases.mkd
+++ b/docs/04_releases.mkd
@@ -19,6 +19,7 @@ If you are updating from an earlier release AND you have indexed branches with t
- Repository URL uses `X-Forwarded-Proto` and `X-Forwarded-Port`, if available, for reverse proxy configurations (issue 115)
- Output real RAW content, not simulated RAW content (issue 114)
- Fixed Lucene charset encoding bug when reindexing a repository (issue 112)
+- Fixed search box linking to Lucene page for nested repository on Tomcat (issue 111)
- Fixed null pointer in LdapUserSerivce if account has a null email address (issue 110)
- Really fixed failure to update a GO setting from the manager (issue 85)
diff --git a/src/com/gitblit/wicket/pages/RepositoryPage.java b/src/com/gitblit/wicket/pages/RepositoryPage.java
index 45822e16..4b5e28d4 100644
--- a/src/com/gitblit/wicket/pages/RepositoryPage.java
+++ b/src/com/gitblit/wicket/pages/RepositoryPage.java
@@ -32,6 +32,8 @@ import org.apache.wicket.markup.html.link.ExternalLink;
import org.apache.wicket.markup.html.panel.Fragment;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
+import org.apache.wicket.protocol.http.RequestUtils;
+import org.apache.wicket.request.target.basic.RedirectRequestTarget;
import org.eclipse.jgit.diff.DiffEntry.ChangeType;
import org.eclipse.jgit.lib.PersonIdent;
import org.eclipse.jgit.lib.Repository;
@@ -364,8 +366,12 @@ public abstract class RepositoryPage extends BasePage {
// this repository is Lucene-indexed
searchPageClass = LuceneSearchPage.class;
}
- setResponsePage(searchPageClass,
- WicketUtils.newSearchParameter(repositoryName, null, searchString, searchType));
+ // use an absolute url to workaround Wicket-Tomcat problems with
+ // mounted url parameters (issue-111)
+ PageParameters params = WicketUtils.newSearchParameter(repositoryName, null, searchString, searchType);
+ String relativeUrl = urlFor(searchPageClass, params).toString();
+ String absoluteUrl = RequestUtils.toAbsolutePath(relativeUrl);
+ getRequestCycle().setRequestTarget(new RedirectRequestTarget(absoluteUrl));
}
}
}