From e905d93f9f88bf9a5a549cc1355385ac1029cbb4 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Sat, 23 Jan 2010 13:42:56 -0800 Subject: [PATCH] Disable the JRE HTTP cache, if any We don't want to use the JRE cache when fetching content. Change-Id: Id76f3e618967c98ed4fbc47a1a2a9e77acbe41ab Signed-off-by: Shawn O. Pearce --- org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java | 1 + 1 file changed, 1 insertion(+) 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 f041765b..c53bcf26 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java @@ -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); -- 2.11.4.GIT