A Place for my head

On Ruby, Rails, Concurrency and fiction

Posted in : rails | No comments

Our flash guy, uses usual loadVars for loading external data in a flash movie and do some funky stuff like plotting of nice looking portfolio charts.
Portfolio Chart

But somehow, we saw some issues with loading of charts in IE6 running flash. A quick ethreal packet sniffing showed us, that although client is making
request with “Accept-Encoding: gzip,deflate”, its not able to decode the gzip response of web server. And parsing of gzipped response at flash obviously fails.

This is quite a corner case, I suppose, but I did this, to prevent Content-Encoding for that particular controller.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
class OutputCompressionFilter
  def self.filter(controller)
    controller.response.headers['Content-Encoding'] = 'identity'
  end
end
 
class FlashController < ApplicationController
  no_pref true
  after_filter OutputCompressionFilter
  layout :set_layout
  include REXML
  def index
  end
end

Leave a Reply