News for hackers. Stuff that matters.
Re:On incomplete HTTP reads and the requests library in Python by dfox on Sunday April 22, 2018 @06:14PM (#16898930)
As for the compression and resulting discrepancy of length: if you are doing transparent HTTP compression, you are supposed to send Transfer-Encoding: gzip (which implies chunked mode and that Content-Length shoul not be present and should be ignored by UA). Content-Encoding: gzip means that the resource itself is gzip compressed (which means that the UA should decompress it for displaying to user, but should save it to disk compressed, IE and Safari gets this wrong)
Re:On incomplete HTTP reads and the requests library in Python by tonyarkles on Sunday April 22, 2018 @10:57PM (#16900182)
Ahhhhh... Thanks! I've always wondered why occasionally .tar.gz downloads end up ungzipped on disk (as just a .tar). Guess it was when using IE or Safari.