Content Encoding Error (content_encoding_error)


Article ID: 167694


Updated On:


Advanced Secure Gateway Software - ASG ProxySG Software - SGOS


When trying to go to a particular web site through the ProxySG, the client continues to see the

Content Encoding Error (content_encoding_error)

error message in the browser.

Error message seen in the client web browsers returned by ProxySG:

Content Encoding Error (content_encoding_error)

Server response could not be decoded using encoding type returned by server.

This is typically caused by a Web Site presenting a content encoding header of one type, and then encoding the data differently.


The  cause of this error message is a web server whose HTTP response headers indicate that it will be responding with one type of encoding, but instead responds with a different type of encoding. For example, what is commonly seen is that a web server returns a gzip compressed object, but the content is actually text.


There is no "fix" on the proxy for this behavior as the web server is behaving incorrectly.  However, in the specific scenario described above, if you want to allow the content from the web server to be delivered to the user you can implement the following policy based workaround.  This workaround removes the header in the client request indicating that the client can receive encoded content and instead forces the server to respond with the file in its original form.

VPM example:

  1. Create a new Web Access Layer
  2. In the "Destination" column of the first rule, set to either the Request URL object of the site in question or a category object containing the list of URLs you wish to match to this rule.
  3. In the "Action" column, create a new object.  Use a "Control Request Header" object.  Select "Accept-Encoding" from the Header Name list.
  4. Leave the radio button at its default of  "suppress".
  5. Press OK and install this new policy.

CPL example:  (Replace with the name, or category of the site experiencing the problem.)


<Proxy> action.ControlRequestHeader1(yes)
define action ControlRequestHeader1
end action ControlRequestHeader1