You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not exactly shure how and why, but setting user-agent header together with transparent_gzip_decompression gives this error:
require'httpclient'clnt=HTTPClient.newclnt.transparent_gzip_decompression=trueresp=clnt.request(:get,'http://www.google.ru',{header: {'User-Agent'=>'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0',}})presp.headers
/home/gleb/.rvm/gems/ruby-2.0.0-p0@ml_vk/gems/httpclient-2.3.3/lib/httpclient/session.rb:697:in `inflate': incorrect data check (Zlib::DataError)
from /home/gleb/.rvm/gems/ruby-2.0.0-p0@ml_vk/gems/httpclient-2.3.3/lib/httpclient/session.rb:697:in `block in get_body'
from /home/gleb/.rvm/gems/ruby-2.0.0-p0@ml_vk/gems/httpclient-2.3.3/lib/httpclient/session.rb:990:in `read_body_chunked'
from /home/gleb/.rvm/gems/ruby-2.0.0-p0@ml_vk/gems/httpclient-2.3.3/lib/httpclient/session.rb:701:in `get_body'
from /home/gleb/.rvm/gems/ruby-2.0.0-p0@ml_vk/gems/httpclient-2.3.3/lib/httpclient.rb:1088:in `do_get_block'
from /home/gleb/.rvm/gems/ruby-2.0.0-p0@ml_vk/gems/httpclient-2.3.3/lib/httpclient.rb:887:in `block in do_request'
from /home/gleb/.rvm/gems/ruby-2.0.0-p0@ml_vk/gems/httpclient-2.3.3/lib/httpclient.rb:981:in `protect_keep_alive_disconnected'
from /home/gleb/.rvm/gems/ruby-2.0.0-p0@ml_vk/gems/httpclient-2.3.3/lib/httpclient.rb:886:in `do_request'
from /home/gleb/.rvm/gems/ruby-2.0.0-p0@ml_vk/gems/httpclient-2.3.3/lib/httpclient.rb:774:in `request'
from dl.rb:6:in `<main>'
And even more strangely, it works fine (no errors, contents are fine) if I enable debug with clnt.debug_dev = STDERR
The text was updated successfully, but these errors were encountered:
I'm not exactly shure how and why, but setting user-agent header together with transparent_gzip_decompression gives this error:
And even more strangely, it works fine (no errors, contents are fine) if I enable debug with
clnt.debug_dev = STDERR
The text was updated successfully, but these errors were encountered: