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

Collapse
Posted by Gustaf Neumann on
Typically, you have upfront no idea, whether the reply from the server will be a streaming response, or chunked-encoding, or an HTTP/1.0 style server without a content-length.

One can always send a HEAD request via ns_http and make further decisions based on the result. In the (hopefully) seldom case, where the server does not support the HEAD request, there is also the possibility to set the "response_header_callback" and terminate the request via exception from the callback proc.

Does this address your concern?