aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Nelson <michael.nelson@tasktop.com>2013-08-26 09:35:48 -0700
committerChris Aniszczyk <caniszczyk@gmail.com>2013-10-26 18:20:27 -0400
commit9e9f00df9eb5fb44d7de4d7ae9f8fa0d0b557a6c (patch)
treed9269c6470c79d3fb0430ce56e2c2e5d3a5dd818
parent40e8ba418637fd987745e7ee53ef80332d64647b (diff)
downloadjgit-9e9f00df9eb5fb44d7de4d7ae9f8fa0d0b557a6c.tar.gz
jgit-9e9f00df9eb5fb44d7de4d7ae9f8fa0d0b557a6c.zip
Support extension of TransportHttp
This allows subclasses to configure the HTTP connection (for example, to add headers to the request). Bug: 400724 Change-Id: I6f9d699e158a7b9d813c8fa8d273992a28994e41 Signed-off-by: Michael Nelson <michael.nelson@tasktop.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
index baaf8867e4..45bf2db47e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
@@ -504,7 +504,16 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
return httpOpen(METHOD_GET, u);
}
- final HttpURLConnection httpOpen(String method, URL u) throws IOException {
+ /**
+ * Open an HTTP connection.
+ *
+ * @param method
+ * @param u
+ * @return the connection
+ * @throws IOException
+ */
+ protected HttpURLConnection httpOpen(String method, URL u)
+ throws IOException {
final Proxy proxy = HttpSupport.proxyFor(proxySelector, u);
HttpURLConnection conn = (HttpURLConnection) u.openConnection(proxy);