2

I am using /Document/{id}/Body endpoint to download the file.

The returned response headers don't contain a content-length header { which really is a norm, right ? } ...

Does anyone know why that is the case ? Any other work around ?

1 Answer 1

3

Content-Length is not required if the response uses a chunked transfer encoding. One possible work around would be to use a HTTP/1.0 request rather than 1.1 as i think chunked transfer is not a part of 1.0. But really you shouldn't be relying on the header, what do you need it for?

2
  • res.responseBody.size() should suffice, though, shouldn't it?
    – sfdcfox
    Commented Dec 19, 2013 at 21:41
  • depends on what you're using to make the request.
    – superfell
    Commented Dec 19, 2013 at 21:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .