]> source.dussan.org Git - jgit.git/commitdiff
Support extension of TransportHttp 58/15858/2
authorMichael Nelson <michael.nelson@tasktop.com>
Mon, 26 Aug 2013 16:35:48 +0000 (09:35 -0700)
committerChris Aniszczyk <caniszczyk@gmail.com>
Sat, 26 Oct 2013 22:20:27 +0000 (18:20 -0400)
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>
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java

index baaf8867e4b74b4b822ec4cea0dd15b23400ff29..45bf2db47e8d5ab2d5a9af549c4e22f5c29e7bd0 100644 (file)
@@ -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);