savonrb / savon

Heavy metal SOAP client
https://www.savonrb.com
MIT License
2.07k stars 616 forks source link

NameError: uninitialized constant Rack::Headers after upgrade from 2.14.0 to 2.15.0 #1002

Closed kpalmvik closed 7 months ago

kpalmvik commented 7 months ago

Bug report

Current behavior:

After upgrading to 2.15.0 our test suite started failing on Savon::Client#call with NameError: uninitialized constant Rack::Headers-

Steps to reproduce current behavior:

Given the following (simplified) test:

  test "should work" do
    stub_request(:post, "https://example.com/test").to_return(status: 200, body: "", headers: {})
    soap_client = Savon.client do
      endpoint "https://example.com/test"
      namespace "urn:example:exampleEvent"
      namespaces({"xmlns:urn" => "urn:example:exampleEvent"})
    end

    soap_client.call("ExampleEvent", soap_action: "example:exampleEvent#ExampleAction", message: {})

    assert_requested(:post, "https://example.com/test", times: 1)
  end

❌ 2.15.0 raises NameError: uninitialized constant Rack::Headers inside the #call call.

Expected behavior:

✅ 2.14.0 passes.

System information:

pcai commented 7 months ago

Thanks for the detailed report. It looks like this is a known issue with savon 2.15.0 + httpi 4.0 + rack 2.x, which is tracked here https://github.com/savonrb/httpi/issues/244

pcai commented 7 months ago

closing this as https://github.com/savonrb/httpi/issues/244 should now be resolved with the release of httpi 4.0.1