diff --git a/lib/savon/operation.rb b/lib/savon/operation.rb index 00e40d87..506e627a 100644 --- a/lib/savon/operation.rb +++ b/lib/savon/operation.rb @@ -109,10 +109,6 @@ def build_request(builder) request.headers["MIME-Version"] = "1.0" end - # TODO: could HTTPI do this automatically in case the header - # was not specified manually? [dh, 2013-01-04] - request.headers["Content-Length"] = request.body.bytesize.to_s - request end diff --git a/spec/savon/operation_spec.rb b/spec/savon/operation_spec.rb index e10a6d61..6f17bb5d 100644 --- a/spec/savon/operation_spec.rb +++ b/spec/savon/operation_spec.rb @@ -106,15 +106,6 @@ def new_operation(operation_name, wsdl, globals) operation.call end - it "sets the Content-Length header" do - # XXX: probably the worst spec ever written. refactor! [dh, 2013-01-05] - http_request = HTTPI::Request.new - http_request.headers.expects(:[]=).with("Content-Length", "723") - Savon::SOAPRequest.any_instance.expects(:build).returns(http_request) - - new_operation(:verify_address, wsdl, globals).call - end - it "passes the local :soap_action option to the request builder" do globals.endpoint @server.url(:inspect_request) soap_action = "http://v1.example.com/VerifyAddress"