Skip to content

Commit

Permalink
rm content-length header
Browse files Browse the repository at this point in the history
  • Loading branch information
pcai committed Jul 15, 2024
1 parent 729e058 commit 9da94ff
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
4 changes: 0 additions & 4 deletions lib/savon/operation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 0 additions & 9 deletions spec/savon/operation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 9da94ff

Please sign in to comment.