Fix gitweb review link

I99d426c8a caused a regression where the review link in a commit does
not link to the review page for a change.

Change-Id: I106b23d0d5e82313005f8252c86431c5d9004bcb
This commit is contained in:
Hector Oswaldo Caballero
2017-01-18 06:33:01 -05:00
parent 31235233d0
commit 2897e9d2e3

View File

@@ -232,10 +232,11 @@ class GitwebServlet extends HttpServlet {
p.print(" if (( $secure && $ENV{'SERVER_PORT'} != 443)\n");
p.print(" || (!$secure && $ENV{'SERVER_PORT'} != 80)\n");
p.print(" );\n");
p.print(" $http_url .= qq{$ENV{'GERRIT_CONTEXT_PATH'}};\n");
p.print(" my $context = $ENV{'GERRIT_CONTEXT_PATH'};\n");
p.print(" chop($context);\n");
p.print(" $http_url .= qq{$context};\n");
p.print(" $http_url .= qq{/a}\n");
p.print(" unless $ENV{'GERRIT_ANONYMOUS_READ'};\n");
p.print(" \n");
p.print(" push @git_base_url_list, $http_url;\n");
p.print("}\n");
@@ -545,7 +546,7 @@ class GitwebServlet extends HttpServlet {
env.set("HTTP_" + name.toUpperCase().replace('-', '_'), value);
}
env.set("GERRIT_CONTEXT_PATH", req.getContextPath());
env.set("GERRIT_CONTEXT_PATH", req.getContextPath() + "/");
env.set("GERRIT_PROJECT_NAME", project.getProject().getName());
env.set("GITWEB_PROJECTROOT",