lib/savon/request.rb in savon-0.7.6 vs lib/savon/request.rb in savon-0.7.7

- old
+ new

@@ -44,15 +44,15 @@ include Logger # Content-Types by SOAP version. ContentType = { 1 => "text/xml;charset=UTF-8", 2 => "application/soap+xml;charset=UTF-8" } - # Expects a SOAP +endpoint+ String. Also accepts an optional Hash - # of +options+ for specifying a proxy server. + # Expects a WSDL or SOAP +endpoint+ and accepts a custom +proxy+ address. def initialize(endpoint, options = {}) @endpoint = URI endpoint - @proxy = options[:proxy] ? URI(options[:proxy]) : URI("") + @proxy = URI options[:proxy] || "" + headers["Accept-encoding"] = "gzip,deflate" if options[:gzip] end # Returns the endpoint URI. attr_reader :endpoint @@ -133,5 +133,6 @@ { "Content-Type" => ContentType[@soap.version], "SOAPAction" => @soap.action } end end end +