diff options
| author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-12 06:32:50 +0000 |
|---|---|---|
| committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-12 06:32:50 +0000 |
| commit | affff5630ca336f4c97072e0238a1568b98e8f3a (patch) | |
| tree | ff83ba9a822107e161376190814332767d1cd174 /lib/net | |
| parent | b9af2293eb29f1ca3d64f18fab206db8ba8727b5 (diff) | |
| download | ruby-affff5630ca336f4c97072e0238a1568b98e8f3a.tar.gz ruby-affff5630ca336f4c97072e0238a1568b98e8f3a.tar.xz ruby-affff5630ca336f4c97072e0238a1568b98e8f3a.zip | |
* lib/net/http.rb (send_request_with_body): Content-Length should be byte length of string. (closes #203)
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net')
| -rw-r--r-- | lib/net/http.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb index c19064bf6..b3ddee54e 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -1648,7 +1648,7 @@ module Net #:nodoc: private def send_request_with_body(sock, ver, path, body) - self.content_length = body.length + self.content_length = body.bytesize delete 'Transfer-Encoding' supply_default_content_type write_header sock, ver, path |
