apps/soap/controllers/soap_controller.rb in spiderfw-0.6.26.pre1 vs apps/soap/controllers/soap_controller.rb in spiderfw-0.6.26
- old
+ new
@@ -12,14 +12,17 @@
class SoapController < Controller
include Soap
include HTTPMixin
- options[:allow_content_encoding_gzip] = true
class <<self
attr_accessor :soap_methods, :soap_types
+
+ def soap_options
+ @options ||= {:allow_content_encoding_gzip => true}
+ end
# Returns the currently used soap registry
def soap_registry
@registry ||= SOAP::Mapping::Registry.new
end
@@ -217,10 +220,10 @@
gz.close
end
end
def encode_gzip?
- self.class.options[:allow_content_encoding_gzip] and defined?(::Zlib) and
+ self.class.soap_options[:allow_content_encoding_gzip] and defined?(::Zlib) and
@request.env['HTTP_ACCEPT_ENCODING'] and
@request.env['HTTP_ACCEPT_ENCODING'].split(/,\s*/).include?('gzip')
end
def to_wsdl