lib/protocols/httpcli2.rb in eventmachine-eventmachine-0.12.3 vs lib/protocols/httpcli2.rb in eventmachine-eventmachine-0.12.4

- old
+ new

@@ -127,26 +127,26 @@ if ln.length > 0 chunksize = ln.to_i(16) if chunksize > 0 @conn.set_text_mode(ln.to_i(16)) else - @content = @content.join + @content = @content ? @content.join : '' @chunk_trailer = true end else # We correctly come here after each chunk gets read. - p "Got A BLANK chunk line" + # p "Got A BLANK chunk line" end end #-- # We get a single chunk. Append it to the incoming content and switch back to line mode. # def receive_chunked_text text - p "RECEIVED #{text.length} CHUNK" + # p "RECEIVED #{text.length} CHUNK" (@content ||= []) << text end #-- @@ -232,10 +232,10 @@ args = args.first end h,prt,ssl = args[:host], Integer(args[:port]), (args[:tls] || args[:ssl]) conn = EM.connect( h, prt, self ) - # TODO, start_tls if necessary + conn.start_tls if ssl conn.set_default_host_header( h, prt, ssl ) conn end