Re: Content length of a response in treq
Adi Roiban <[email protected]> Sun, 10 Feb 2019 19:36:19 +0000
| Newsgroups | gmane.comp.python.twisted |
|---|---|
| Message-ID | <CAFycZ9fuLVdVLZ1pfvrJP2Ak0fw=Doqe6+khyHhbEX0SqyS6Hw@mail.gmail.com> |
On Sun, 10 Feb 2019 at 18:23, Mehtab Zafar <[email protected]> wrote: > > Hi, > I am trying to use treq for a project in which I am also going to generate a progress bar for the downloading session. But the problem I am facing is that I can't find a way to get the content length header from the response. > > The "response.length" gives me "unknown size".So I there a way I can get the length for all types of content? > > Thanks Hi, Which encoding is used for your response? Do you have Chunked encoding https://en.wikipedia.org/wiki/Chunked_transfer_encoding In this case, the content length is not advertised in the response headers. Regards, -- Adi Roiban _______________________________________________ Twisted-Python mailing list [email protected] https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python