Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Changeset 1777

Show
Ignore:
Timestamp:
05/15/07 22:50:25 (2 years ago)
Author:
nahi
Message:
  • detect gziped content from HTTP body, not HTTP header. Applied a patch at [ruby-core:9838]. Thanks! closes #310.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/soap/streamHandler.rb

    r1665 r1777  
    229229      raise HTTPStreamError.new("#{ res.status }: #{ res.reason }") 
    230230    end 
     231 
     232    # decode gzipped content, if we know it's there from the headers 
    231233    if res.respond_to?(:header) and !res.header['content-encoding'].empty? and 
    232234        res.header['content-encoding'][0].downcase == 'gzip' 
     235      receive_string = decode_gzip(receive_string) 
     236    # otherwise check for the gzip header 
     237    elsif @accept_encoding_gzip && receive_string[0..1] == "\x1f\x8b" 
    233238      receive_string = decode_gzip(receive_string) 
    234239    end