summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2010-01-23 13:42:56 -0800
committerShawn O. Pearce <spearce@spearce.org>2010-01-23 14:07:15 -0800
commite905d93f9f88bf9a5a549cc1355385ac1029cbb4 (patch)
tree4ba01eb682acf2bcf0d58cfa4ec7dcbfefd23126 /org.eclipse.jgit
parent0238a21b624abf079ae21835a13067d2c8dedd81 (diff)
downloadjgit-e905d93f9f88bf9a5a549cc1355385ac1029cbb4.tar.gz
jgit-e905d93f9f88bf9a5a549cc1355385ac1029cbb4.zip
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 <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java1
1 files changed, 1 insertions, 0 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 f041765b8a..c53bcf2601 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);