aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib/active_resource/connection.rb
diff options
context:
space:
mode:
authorTobias Lütke <tobias.luetke@gmail.com>2007-06-19 18:40:28 +0000
committerTobias Lütke <tobias.luetke@gmail.com>2007-06-19 18:40:28 +0000
commitbf280157d9c92637a3a270510b2ff67be27a302e (patch)
tree3443b5f3accd0b82acfc48f135a20660c5a4a6fc /activeresource/lib/active_resource/connection.rb
parent6af2cbca07821e66cc358a4105a54c78f1dde19b (diff)
downloadrails-bf280157d9c92637a3a270510b2ff67be27a302e.tar.gz
rails-bf280157d9c92637a3a270510b2ff67be27a302e.tar.bz2
rails-bf280157d9c92637a3a270510b2ff67be27a302e.zip
Ensure that post and put requests pass in Content-Length to the server.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7064 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activeresource/lib/active_resource/connection.rb')
-rw-r--r--activeresource/lib/active_resource/connection.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activeresource/lib/active_resource/connection.rb b/activeresource/lib/active_resource/connection.rb
index ef4d92451c..d41171270c 100644
--- a/activeresource/lib/active_resource/connection.rb
+++ b/activeresource/lib/active_resource/connection.rb
@@ -71,13 +71,13 @@ module ActiveResource
# Execute a PUT request (see HTTP protocol documentation if unfamiliar).
# Used to update resources.
def put(path, body = '', headers = {})
- request(:put, path, body, build_request_headers(headers))
+ request(:put, path, body.to_s, build_request_headers(headers))
end
# Execute a POST request.
# Used to create new resources.
def post(path, body = '', headers = {})
- request(:post, path, body, build_request_headers(headers))
+ request(:post, path, body.to_s, build_request_headers(headers))
end
def xml_from_response(response)