From a379d007dbf5eefbe8c93738755582586eb835b1 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Mon, 11 May 2020 10:36:54 +0200 Subject: Fix downloading LFS Object fails behind proxy When downloading LFS objects also accept response code 203 as successful download. This response may be seen when downloading via a proxy. Bug: 563022 Change-Id: Iee85fdb451b33369d08859872e5bfc2a67dffa6d Signed-off-by: Matthias Sohn --- org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'org.eclipse.jgit.lfs/src') diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java index 23ece3e484..2f80d5b9a7 100644 --- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java +++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java @@ -133,7 +133,8 @@ public class SmudgeFilter extends FilterCommand { .toRequest(Protocol.OPERATION_DOWNLOAD, res)) .getBytes(UTF_8)); int responseCode = lfsServerConn.getResponseCode(); - if (responseCode != HttpConnection.HTTP_OK) { + if (!(responseCode == HttpConnection.HTTP_OK + || responseCode == HttpConnection.HTTP_NOT_AUTHORITATIVE)) { throw new IOException( MessageFormat.format(LfsText.get().serverFailure, lfsServerConn.getURL(), -- cgit v1.2.3