summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2012-03-22 14:09:22 -0700
committerShawn O. Pearce <sop@google.com>2012-03-22 14:18:40 -0700
commitc3d2f2b76f1f34703106031bdbcb6c34df81686c (patch)
treeaf7b57c5e81512bcd7e3d7ab530069303c98fcfb
parentcd7c5deca0b0594bd8addd5a0fe18b962d2679e9 (diff)
downloadgit-repo-c3d2f2b76f1f34703106031bdbcb6c34df81686c.tar.gz
Ignore /clone.bundle on HTTP 401, 403 and 404v1.8.1
401: Unauthorized, authentication may be required. This is usually handled internally by the HTTP client in Python. If it reaches our code in repo, the Python HTTP client didn't find a password in ~/.netrc that it could use. 403: Authentication was supplied, but is incorrect. It might be that the CDN doesn't want to offer this clone.bundle file to the client, but the Git fetch operation would still be successful. This might arise if branch level read controls were used in Gerrit Code Review and the /clone.bundle file contained branches not visible to the client. 404: The server has no /clone.bundle file available. In all of these cases, sliently ignore the /clone.bundle file HTTP error and let the Git operation take over. Change-Id: I1787f3cac86b017351952bbb793fe5874d83c72b
-rw-r--r--project.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/project.py b/project.py
index b80ad319..946a6ac3 100644
--- a/project.py
+++ b/project.py
@@ -1516,7 +1516,7 @@ class Project(object):
1516 except: 1516 except:
1517 return None 1517 return None
1518 1518
1519 if e.code == 404: 1519 if e.code in (401, 403, 404):
1520 keep = False 1520 keep = False
1521 return False 1521 return False
1522 elif _content_type() == 'text/plain': 1522 elif _content_type() == 'text/plain':