Limit the maximum HTTP download size
search cancel

Limit the maximum HTTP download size

book

Article ID: 166671

calendar_today

Updated On:

Products

ProxySG Software - SGOS

Issue/Introduction

Limit the maximum HTTP download size
Limiting the maximum HTTP download size
You want to limit the maximum http download size

Resolution

Currently the only way that you can limit the size of HTTP objects returned is by creating policy that matches on the content-length header of the object returned. Objects that are not returned with a content-length will not match the following policy. Proxied FTP requests will also not be affected by this policy since they are not returned with a content-length header.

The following policy blocks objects that have a content length greater than 999999 bytes. Note that the first line of the policy is a regular expression indicating that content-length headers containing between 1 and 6 digits are allowed. The second line of policy (which evaluates only if the first was false) indicates that if a content-length header exists, deny the request.


response.header.content-length="^[0-9]{1,6}$" ALLOW
response.header.content-length="" DENY