Errores #148
httpclient uses String#size instead of String#bytesize so sets a wrong value in Ruby 1.9
| Status: | Nueva | Start: | 11/27/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | % 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
Fixed in http://github.com/nahi/httpclient/commit/261b28061caeabd228bc1c3175892e2736400e10.
But there is not yet a official gem version.