Errores #148

httpclient uses String#size instead of String#bytesize so sets a wrong value in Ruby 1.9

Added by Iñaki Baz Castillo over 2 years ago. Updated over 2 years ago.

Status:Nueva Start:11/27/2009
Priority:Normal Due date:
Assigned to:Iñaki Baz Castillo % Done:

0%

Category:HTTPClient
Target version:Nice to have

Description

Bug reported in httpclient: http://github.com/nahi/httpclient/issues/closed/#issue/23

httpclient uses "size" to calculate the body size in PUT requests, so in Ruby 1.9 it sets a wrong value (it should use "bytesize").

httpclient-2.1.5.2/lib/httpclient/http.rb:

      # Initialize this instance as a response.
      def init_response(body = nil)
        @body = body
        if @body.respond_to?(:size)
          @size = @body.size
        else
          @size = nil
        end
      end
<pre>

History

Updated by Iñaki Baz Castillo over 2 years ago

  • Target version changed from 1.2.1 to Nice to have

Also available in: Atom PDF