Author Topic: HOWTO: turning off server compression  (Read 871 times)

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 152
  • Karma: 16
HOWTO: turning off server compression
« on: March 01, 2008, 03:10:16 PM »
Problem:  The system doesn't modify content that is already compressed before being received
Solution:  Tested with 8.1 build 32.1, but should apply to 7.0+ with little modification

add rewrite action "remove-ae" delete_http_header "Accept-Encoding"
add rewrite policy "remove-ae" true "remove-ae"
bind rewrite global "remove-ae" 10 NEXT -type REQ_DEFAULT

Offline evildani

  • Administrator
  • Hero Member
  • *****
  • Posts: 290
  • Karma: 17
Re: HOWTO: turning off server compression
« Reply #1 on: April 08, 2008, 04:35:16 AM »
If you remove the Accept-Encoding header will the NS compress the response?

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 152
  • Karma: 16
Re: HOWTO: turning off server compression
« Reply #2 on: April 08, 2008, 11:06:41 AM »
Yep, the NS itself will parse and flag the request as compression acceptable--it will remove the header right before sending it to the server itself.  In the response chain, things are a little different, as rewrite is the first (not last) thing processing, so you can control response-side behaviors in the NS with rewrite.

The Oracle