浏览代码

Support missing content type.

Jelmer Vernooij 2 年之前
父节点
当前提交
77e8313497
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      dulwich/client.py

+ 3 - 1
dulwich/client.py

@@ -1943,7 +1943,9 @@ class AbstractHttpGitClient(GitClient):
             base_url = resp.redirect_location[: -len(tail)]
 
         try:
-            self.dumb = not resp.content_type.startswith("application/x-git-")
+            self.dumb = (
+                resp.content_type is None
+                or not resp.content_type.startswith("application/x-git-"))
             if not self.dumb:
                 proto = Protocol(read, None)
                 # The first line should mention the service