diff options
3 files changed, 14 insertions, 1 deletions
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(), diff --git a/org.eclipse.jgit/.settings/.api_filters b/org.eclipse.jgit/.settings/.api_filters index c8b7bf799e..2d860f59db 100644 --- a/org.eclipse.jgit/.settings/.api_filters +++ b/org.eclipse.jgit/.settings/.api_filters @@ -7,5 +7,11 @@ <message_argument value="HTTP_11_MOVED_PERM"/> </message_arguments> </filter> + <filter id="403767336"> + <message_arguments> + <message_argument value="org.eclipse.jgit.transport.http.HttpConnection"/> + <message_argument value="HTTP_NOT_AUTHORITATIVE"/> + </message_arguments> + </filter> </resource> </component> diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnection.java index c4d086d4bd..98c231a46d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnection.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnection.java @@ -41,6 +41,12 @@ public interface HttpConnection { int HTTP_OK = java.net.HttpURLConnection.HTTP_OK; /** + * @see HttpURLConnection#HTTP_NOT_AUTHORITATIVE + * @since 5.8 + */ + int HTTP_NOT_AUTHORITATIVE = java.net.HttpURLConnection.HTTP_NOT_AUTHORITATIVE; + + /** * @see HttpURLConnection#HTTP_MOVED_PERM * @since 4.7 */ |