# This can point to a file with Markdown content.\r
# Specifying "gitblit" uses the internal login message.\r
#\r
-# SINCE 0.6.1\r
+# SINCE 0.7.0\r
web.loginMessage = gitblit\r
\r
# This is the message displayed above the repositories table.\r
# RESTART REQUIRED\r
server.useNio = true\r
\r
+# Context path for the application.\r
+#\r
+# SINCE 0.7.0\r
+# RESTART REQUIRED\r
+server.contextPath = /\r
+\r
# Standard http port to serve. <= 0 disables this connector.\r
# On Unix/Linux systems, ports < 1024 require root permissions.\r
# Recommended value: 80 or 8080\r
# SINCE 0.5.0\r
# RESTART REQUIRED\r
server.shutdownPort = 8081\r
-\r
-# Context path for the application.\r
-#\r
-# SINCE 0.7.0+\r
-# RESTART REQUIRED\r
-server.contextPath = /\r
- fixed: Null pointer exception if did not set federation strategy (issue 20)\r
- fixed: Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later\r
- added: IUserService.setup(IStoredSettings) for custom user service implementations\r
+- added: setting to control Gitblit GO context path for proxy setups<br/>**New:** *server.contextPath = /*\r
\r
issues, binaries, and sources @ [Google Code][googlecode]<br/>\r
sources @ [Github][gitbltsrc]\r
### Gitblit WAR will not authenticate any users?!\r
Confirm that the <context-param> *realm.userService* value in your `web.xml` file actually points to a `users.properties` file.\r
\r
-### Gitblit won't open my grouped repository (/group/myrepo.git) or browse my branch/tag/ref?!\r
-This is likely an url encoding/decoding problem related to your servlet container's security. There are two possible workarounds for this issue. In `gitblit.properties` or `web.xml`:\r
+### Gitblit won't open my grouped repository (/group/myrepo.git) or browse my log/branch/tag/ref?!\r
+This is likely an url encoding/decoding problem with forward slashes. There are two possible workarounds for this issue. In `gitblit.properties` or `web.xml`:\r
\r
1. try setting *web.mountParameters* to *false*.<br/>This changes the url scheme from mounted (*/commit/myrepo.git/abcdef*) to parameterized (*/commit/?r=myrepo.git&h=abcdef*).\r
2. try changing *web.forwardSlashCharacter* to an asterisk or a **!**\r
\r
+Also, if you are running Gitblit behind a proxy, you must ensure that the proxy does not decode and then re-encode request urls with interpretation of *%2F*. If you are using Apache mod_proxy, specify [AllowEncodedSlashes NoDecode](http://httpd.apache.org/docs/2.2/mod/core.html#allowencodedslashes).\r
+\r
## General Interest Questions\r
\r
### Gitblit? What kind of name is that?\r
- fixed: Null pointer exception if did not set federation strategy (issue 20)\r
- fixed: Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later\r
- added: IUserService.setup(IStoredSettings) for custom user service implementations\r
+- added: setting to control Gitblit GO context path for proxy setups<br/>**New:** *server.contextPath = /*\r
\r
### Older Releases\r
\r
\r
// The build script extracts this exact line so be careful editing it\r
// and only use A-Z a-z 0-9 .-_ in the string.\r
- public static final String VERSION = "0.6.1-SNAPSHOT";\r
+ public static final String VERSION = "0.7.0-SNAPSHOT";\r
\r
// The build script extracts this exact line so be careful editing it\r
// and only use A-Z a-z 0-9 .-_ in the string.\r
*/\r
package com.gitblit.wicket;\r
\r
+import java.text.MessageFormat;\r
+\r
+import org.apache.wicket.IRequestTarget;\r
import org.apache.wicket.Page;\r
+import org.apache.wicket.PageParameters;\r
+import org.apache.wicket.request.RequestParameters;\r
import org.apache.wicket.request.target.coding.MixedParamUrlCodingStrategy;\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
\r
import com.gitblit.GitBlit;\r
import com.gitblit.Keys;\r
*/\r
public class GitblitParamUrlCodingStrategy extends MixedParamUrlCodingStrategy {\r
\r
+ private Logger logger = LoggerFactory.getLogger(GitblitParamUrlCodingStrategy.class);\r
+\r
/**\r
* Construct.\r
* \r
}\r
return super.urlDecodePathComponent(value);\r
}\r
+\r
+ /**\r
+ * Gets the decoded request target.\r
+ * \r
+ * @param requestParameters\r
+ * the request parameters\r
+ * @return the decoded request target\r
+ */\r
+ @Override\r
+ public IRequestTarget decode(RequestParameters requestParameters) {\r
+ final String parametersFragment = requestParameters.getPath().substring(\r
+ getMountPath().length());\r
+ logger.debug(MessageFormat\r
+ .format("REQ: {0} PARAMS {1}", getMountPath(), parametersFragment));\r
+\r
+ final PageParameters parameters = new PageParameters(decodeParameters(parametersFragment,\r
+ requestParameters.getParameters()));\r
+ return super.decode(requestParameters);\r
+ }\r
}
\ No newline at end of file