Pārlūkot izejas kodu

Support missing content type.

Jelmer Vernooij 2 gadi atpakaļ
vecāks
revīzija
77e8313497
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  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)]
             base_url = resp.redirect_location[: -len(tail)]
 
 
         try:
         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:
             if not self.dumb:
                 proto = Protocol(read, None)
                 proto = Protocol(read, None)
                 # The first line should mention the service
                 # The first line should mention the service