arthaud / git-dumper

A tool to dump a git repository from a website
MIT License
1.8k stars 247 forks source link

zlib.error: Error -3 while decompressing data: incorrect header check #4

Closed Benjamin-beep closed 3 years ago

Benjamin-beep commented 5 years ago

Hi, i am having a problem, maybe someone knows how to fix this:

Process FindObjectsWorker-28: Traceback (most recent call last): File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap self.run() File "git-dumper.py", line 108, in run result = self.do_task(task, *self.args) File "git-dumper.py", line 285, in do_task obj_file = dulwich.objects.ShaFile.from_path(abspath) File "/usr/local/lib/python3.6/dist-packages/dulwich/objects.py", line 401, in from_path return cls.from_file(f) File "/usr/local/lib/python3.6/dist-packages/dulwich/objects.py", line 407, in from_file obj = cls._parse_file(f) File "/usr/local/lib/python3.6/dist-packages/dulwich/objects.py", line 382, in _parse_file obj._parse_object(map) File "/usr/local/lib/python3.6/dist-packages/dulwich/objects.py", line 362, in _parse_object self.set_raw_string(_decompress(raw)) File "/usr/local/lib/python3.6/dist-packages/dulwich/objects.py", line 84, in _decompress dcomped = dcomp.decompress(string) zlib.error: Error -3 while decompressing data: incorrect header check

arthaud commented 4 years ago

Hi @Benjamin-beep,

Do you still have the issue? Could you provide us a way to reproduce it?

evilboyajay commented 4 years ago

I got the same error at dcomped = dcomp.decompress(string)

vzamanillo commented 4 years ago

This can be caused by a response with status code 200 but with not a binary content like a WAF HTML response or another (stackpath, cloudflare).

Sicks3c commented 4 years ago

@vzamanillo anyway around this ?

vzamanillo commented 4 years ago

@vzamanillo anyway around this ?

No way :/, the one and only solution is passing the headers to request.

DashLt commented 3 years ago

This is caused by sites returning error pages (e.g. not found) with a 200 status code (incorrect, but it happens a lot). #13 closes this, since it now also checks to see whether the Content-Type is HTML.

arthaud commented 3 years ago

This should be fixed by 7da1861375efcc20c9f2b96a4bd6a7e71d160d64