diff options
author | James Moger <james.moger@gitblit.com> | 2011-10-10 19:11:35 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2011-10-10 19:11:35 -0400 |
commit | 70b492b89bdad54abc10795d12f306d8972d94a7 (patch) | |
tree | c26e474aeffd47623c8f83f82de3c356438311e6 | |
parent | 0dccce1b5cffce03124f001ae03b66962f36fee6 (diff) | |
download | gitblit-70b492b89bdad54abc10795d12f306d8972d94a7.tar.gz gitblit-70b492b89bdad54abc10795d12f306d8972d94a7.zip |
Documentation. Updated snapshot to 0.7.0. Merged server.contextPath.
-rw-r--r-- | distrib/gitblit.properties | 14 | ||||
-rw-r--r-- | docs/00_index.mkd | 1 | ||||
-rw-r--r-- | docs/03_faq.mkd | 6 | ||||
-rw-r--r-- | docs/04_releases.mkd | 1 | ||||
-rw-r--r-- | src/com/gitblit/Constants.java | 2 | ||||
-rw-r--r-- | src/com/gitblit/wicket/GitblitParamUrlCodingStrategy.java | 28 |
6 files changed, 42 insertions, 10 deletions
diff --git a/distrib/gitblit.properties b/distrib/gitblit.properties index 78931f27..64358da6 100644 --- a/distrib/gitblit.properties +++ b/distrib/gitblit.properties @@ -114,7 +114,7 @@ web.showFederationRegistrations = false # This can point to a file with Markdown content.
# Specifying "gitblit" uses the internal login message.
#
-# SINCE 0.6.1
+# SINCE 0.7.0
web.loginMessage = gitblit
# This is the message displayed above the repositories table.
@@ -453,6 +453,12 @@ server.tempFolder = temp # RESTART REQUIRED
server.useNio = true
+# Context path for the application.
+#
+# SINCE 0.7.0
+# RESTART REQUIRED
+server.contextPath = /
+
# Standard http port to serve. <= 0 disables this connector.
# On Unix/Linux systems, ports < 1024 require root permissions.
# Recommended value: 80 or 8080
@@ -501,9 +507,3 @@ server.storePassword = gitblit # SINCE 0.5.0
# RESTART REQUIRED
server.shutdownPort = 8081
-
-# Context path for the application.
-#
-# SINCE 0.7.0+
-# RESTART REQUIRED
-server.contextPath = /
diff --git a/docs/00_index.mkd b/docs/00_index.mkd index cf165db5..ddb609f7 100644 --- a/docs/00_index.mkd +++ b/docs/00_index.mkd @@ -35,6 +35,7 @@ Gitblit requires a Java 6 Runtime Environment (JRE) or a Java 6 Development Kit - fixed: Null pointer exception if did not set federation strategy (issue 20)
- fixed: Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later
- added: IUserService.setup(IStoredSettings) for custom user service implementations
+- added: setting to control Gitblit GO context path for proxy setups<br/>**New:** *server.contextPath = /*
issues, binaries, and sources @ [Google Code][googlecode]<br/>
sources @ [Github][gitbltsrc]
diff --git a/docs/03_faq.mkd b/docs/03_faq.mkd index 12ceada6..f690f266 100644 --- a/docs/03_faq.mkd +++ b/docs/03_faq.mkd @@ -36,12 +36,14 @@ Run the server as *root* (security concern) or change the ports you are serving ### Gitblit WAR will not authenticate any users?!
Confirm that the <context-param> *realm.userService* value in your `web.xml` file actually points to a `users.properties` file.
-### Gitblit won't open my grouped repository (/group/myrepo.git) or browse my branch/tag/ref?!
-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`:
+### Gitblit won't open my grouped repository (/group/myrepo.git) or browse my log/branch/tag/ref?!
+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`:
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*).
2. try changing *web.forwardSlashCharacter* to an asterisk or a **!**
+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).
+
## General Interest Questions
### Gitblit? What kind of name is that?
diff --git a/docs/04_releases.mkd b/docs/04_releases.mkd index 214e35cb..303883bd 100644 --- a/docs/04_releases.mkd +++ b/docs/04_releases.mkd @@ -10,6 +10,7 @@ - fixed: Null pointer exception if did not set federation strategy (issue 20)
- fixed: Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later
- added: IUserService.setup(IStoredSettings) for custom user service implementations
+- added: setting to control Gitblit GO context path for proxy setups<br/>**New:** *server.contextPath = /*
### Older Releases
diff --git a/src/com/gitblit/Constants.java b/src/com/gitblit/Constants.java index f4541c9f..a5b7c4f1 100644 --- a/src/com/gitblit/Constants.java +++ b/src/com/gitblit/Constants.java @@ -29,7 +29,7 @@ public class Constants { // The build script extracts this exact line so be careful editing it
// and only use A-Z a-z 0-9 .-_ in the string.
- public static final String VERSION = "0.6.1-SNAPSHOT";
+ public static final String VERSION = "0.7.0-SNAPSHOT";
// The build script extracts this exact line so be careful editing it
// and only use A-Z a-z 0-9 .-_ in the string.
diff --git a/src/com/gitblit/wicket/GitblitParamUrlCodingStrategy.java b/src/com/gitblit/wicket/GitblitParamUrlCodingStrategy.java index 3248a082..fb86fb0e 100644 --- a/src/com/gitblit/wicket/GitblitParamUrlCodingStrategy.java +++ b/src/com/gitblit/wicket/GitblitParamUrlCodingStrategy.java @@ -15,8 +15,15 @@ */
package com.gitblit.wicket;
+import java.text.MessageFormat;
+
+import org.apache.wicket.IRequestTarget;
import org.apache.wicket.Page;
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.request.RequestParameters;
import org.apache.wicket.request.target.coding.MixedParamUrlCodingStrategy;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.gitblit.GitBlit;
import com.gitblit.Keys;
@@ -33,6 +40,8 @@ import com.gitblit.Keys; */
public class GitblitParamUrlCodingStrategy extends MixedParamUrlCodingStrategy {
+ private Logger logger = LoggerFactory.getLogger(GitblitParamUrlCodingStrategy.class);
+
/**
* Construct.
*
@@ -78,4 +87,23 @@ public class GitblitParamUrlCodingStrategy extends MixedParamUrlCodingStrategy { }
return super.urlDecodePathComponent(value);
}
+
+ /**
+ * Gets the decoded request target.
+ *
+ * @param requestParameters
+ * the request parameters
+ * @return the decoded request target
+ */
+ @Override
+ public IRequestTarget decode(RequestParameters requestParameters) {
+ final String parametersFragment = requestParameters.getPath().substring(
+ getMountPath().length());
+ logger.debug(MessageFormat
+ .format("REQ: {0} PARAMS {1}", getMountPath(), parametersFragment));
+
+ final PageParameters parameters = new PageParameters(decodeParameters(parametersFragment,
+ requestParameters.getParameters()));
+ return super.decode(requestParameters);
+ }
}
\ No newline at end of file |