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 | 00b129c4e41bf017e0fec3b43ba684f3fa303f7e (patch) | |
tree | ff83ba9a822107e161376190814332767d1cd174 /lib | |
parent | 6d8c1483d604296a8181431f9a000112356ea163 (diff) | |
download | ruby-00b129c4e41bf017e0fec3b43ba684f3fa303f7e.tar.gz |
* lib/net/http.rb (send_request_with_body): Content-Length should be byte length of string. (closes #203)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-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 c19064bf6d..b3ddee54e0 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 |