]> source.dussan.org Git - jgit.git/commitdiff
Disable the JRE HTTP cache, if any 41/241/1
authorShawn O. Pearce <spearce@spearce.org>
Sat, 23 Jan 2010 21:42:56 +0000 (13:42 -0800)
committerShawn O. Pearce <spearce@spearce.org>
Sat, 23 Jan 2010 22:07:15 +0000 (14:07 -0800)
We don't want to use the JRE cache when fetching content.

Change-Id: Id76f3e618967c98ed4fbc47a1a2a9e77acbe41ab
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java

index f041765b8af53153387afef7b39bfa9c927e21bb..c53bcf2601290d2cc610c04d569ad1b1a64b576b 100644 (file)
@@ -373,6 +373,7 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
        final HttpURLConnection httpOpen(final URL u) throws IOException {
                final Proxy proxy = HttpSupport.proxyFor(proxySelector, u);
                HttpURLConnection conn = (HttpURLConnection) u.openConnection(proxy);
+               conn.setUseCaches(false);
                conn.setRequestProperty(HDR_ACCEPT_ENCODING, ENCODING_GZIP);
                conn.setRequestProperty(HDR_PRAGMA, "no-cache");//$NON-NLS-1$
                conn.setRequestProperty(HDR_USER_AGENT, userAgent);