ProxySG appliance handling of byte-range requests
search cancel

ProxySG appliance handling of byte-range requests

book

Article ID: 165944

calendar_today

Updated On:

Products

ProxySG Software - SGOS

Issue/Introduction

When a client makes a byte-range request to the ProxySG appliance, the appliance may or may not respect that part of the request. This article explains how the appliance handles such a request.

Resolution

There are two scenarios depending if the object is cached or not.

If the object is NOT in cache

  • If the range requested is less than 14336 bytes (14k), the appliance downloads the entire file and serves the range from cache.
  • If the range is more than 14k, the request is treated as non-cacheable and the range is requested from the OCS. The partial file is NOT cached.

If the object is in cache

  • If the request did not include a PNC header (Pragma no-cache), the range is served from the cache.
  • If the request contains a PNC header and the range is less than 14k, the range is served from cache.
  • If the request contains a PNC and the range is greater than 14k, more calculation is done in order to determine if the range will be served from cache or not..

Note: The appliance does not support byte-range requests when the server responds with chunked transfer encoding. When this happens, it results in the appliance serving the entire file with a 200 OK response to the client rather than content-range with only the requested byte-range. 

Workaround

If the caching behavior as described above is causing a problem with a particular server/site and you want the appliance to only send the byte-range as the client has requested, use bypass_cache(yes) in policy for such requests.