Skip to content

Commit

Permalink
The Content-Length header should be the size in bytes
Browse files Browse the repository at this point in the history
From http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

The Content-Length entity-header field indicates the size of the entity-body, in decimal number of OCTETs, sent to the recipient or, in the case of the HEAD method, the size of the entity-body that would have been sent had the request been a GET.
  • Loading branch information
runa committed Dec 26, 2011
1 parent 78a1006 commit aa44b87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/savon/soap/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def configure(http)
http.url = soap.endpoint
http.body = soap.to_xml
http.headers["Content-Type"] = ContentType[soap.version]
http.headers["Content-Length"] = soap.to_xml.length.to_s
http.headers["Content-Length"] = soap.to_xml.bytesize.to_s
http
end

Expand Down

0 comments on commit aa44b87

Please sign in to comment.