Projects

Ticket #340 (closed defect: fixed)

Opened 2 years ago

Last modified 20 months ago

http.get failing with the error "wrong chunk size line: (Net::HTTPBadResponse)"

Reported by: bobstevenson@… Owned by: lsansonetti@…
Priority: blocker Milestone: MacRuby 0.7
Component: MacRuby Keywords: http get
Cc:

Description (last modified by martinlagardette@…) (diff)

http.get is causing a error that says "not in gzip format"

require 'net/http'
require 'rexml/document' 
require 'uri'

token ='mCHpMz2L_a_OrEkz3FSiDg'
hostname = 'api.kayak.com'
port = 80

Net::HTTP.start(hostname, port) do |http|
    response = http.get("/k/ident/apisession?token=#{token}")
end

Change History

Changed 23 months ago by martinlagardette@…

  • summary changed from http.get failing with the error "not in gzip format" to http.get failing with the error "wrong chunk size line: (Net::HTTPBadResponse)"
  • description modified (diff)
  • milestone MacRuby 0.5 deleted

Changed 20 months ago by martinlagardette@…

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to MacRuby 0.7

Fixed with r4234

require 'net/http'
require 'rexml/document' 
require 'uri'

token ='mCHpMz2L_a_OrEkz3FSiDg'
hostname = 'api.kayak.com'
port = 80

Net::HTTP.start(hostname, port) do |http|
  p http
  response = http.get("/k/ident/apisession?token=#{token}")
  p response
end
$> macruby t.rb
#<Net::HTTP api.kayak.com:80 open=true>
#<Net::HTTPOK 200 OK readbody=true>
$>
Note: See TracTickets for help on using tickets.