DataScript: avi.http.set.response.body.buffer.size

Function avi.http.set_response_body_buffer_size( size )
Description Sets the maximum response body to be buffered.
Events HTTP_RESP
Parameter size is the number of kilobytes to be buffered. It may range from 1 to 32,768 kB (32 MB).

Note on memory allocation:
For responses from a back-end server, Avi Vantage allocates 4 kB initially and for responses larger than that, allocations occur in chunks of 48 kB as follows, where ACRB is the actual length of the response body:
* If ACRB < 4 kB, then 4 kB is allocated.
* If ACRB < avi.http.set_response_body_buffer_size(),
then 4 kB + 48 kB * ((ACRB / 48 kB) +1) is allocated.
* If ACRB > avi.http.set_response_body_buffer_size(),
then 4 kB + 48 kB * ((avi.http.set_response_body_buffer_size()/48 kB +1) is allocated.
Returns None
Related avi.http.get_response_body() Reads a specified number of bytes (not to exceed 32,768 kB) from the buffered body starting at the specified byte offset.
Example 1 Response Event Script
avi.http.set_response_body_buffer_size(50)