The ProxySG indicates a content encoding error when downloading a file.
search cancel

The ProxySG indicates a content encoding error when downloading a file.

book

Article ID: 166973

calendar_today

Updated On:

Products

ProxySG Software - SGOS

Issue/Introduction

A website or page is returning a content encoding error.

After setting a block policy on executable files, the ProxySG blocks files with a multi-encoded file extension (such as xxxx.tar.gz.enc), and displays an exception page when attempting to perform a file download.


Policy Example:


;Installed Policy -- compiled at:
;    Default proxy policy is ALLOW

;Policy Rules
<Proxy>
    Deny http.response.apparent_data_type=executable

 

ProxySG exception page example:


 

Resolution

 

 This issue is typically caused by the OCS presenting a content encoding header of one type, but then encoding the data differently.

Workaround 1: Remove the Accept-Encoding header from outbound responses. The OCS admin should also be made aware that they are delivering incorrect data.

Here are three ways to approach the issue.

#1. Modify the Accept-Encoding header via policy.

  1. Add a new rule at the top of the web access layer.
  • Destination: Create a URL object that does a simple match on "<hostname>.com," where "<hostname>.com" is the site that you are having issues with.
  • Action field: Set - New - Action field > suppress headers> select request radio button> accept-encoding - ok.
  1. Install policy.

This will have the affect of removing/suppressing the client/browser's request header Accept-Encoding.

#2. Bypass cache for this site.

1. Add a new rule at the top of the web access layer.

  • Destination: Create a URL object that does a simple match on "<hostname>.com" where "<hostname>.com" is the site that you are having issues with.
  • Action field: Set - Bypass Cache, from the list - ok.

2. Install policy

This will have the affect of removing/supressing the client/browser's request header Accept-Encoding.

#3 Use a bypass cache CPL :

<Cache>
    url.domain="<hostname>.com" cache(no)

 

Workaround 2: Disable the http.response.apparent_data_type policy rule.

 

Workaround 3: Contact the site administrator and request that she/he stops sending the Content-Encoding header.