diff --git a/lib/savon/soap/request.rb b/lib/savon/soap/request.rb index 3cecef8c..b8905bc3 100644 --- a/lib/savon/soap/request.rb +++ b/lib/savon/soap/request.rb @@ -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