Forum OpenACS Q&A: Re: limit size with util::http::get

Collapse
Posted by Gustaf Neumann on
I have extended now the semantics in NaviServer to handle also the cases, where no content-length is provided:
  • If the response includes a Content-Length header, the value is used for comparison, and the request is stopped after processing the header.
  • If no Content-Length header is present, the request is canceled once the number of received bytes exceeds the specified value.
Collapse
Posted by Michael Aram on
Sounds great!

I could imagine cases though, where one wants to receive only the "head" of a file even if there is a content-length header. So maybe the decision regarding the variant could be left to the user?

Just an idea. All the best!