bblimke/webmock — pull request #367 by bjeanes (2014-02-10 23:56:33+00:00)
Title: Fix Rack response mutating request headers

This came up when a `before(:each) {}` RSpec block set up a general Rack-backed stub for all requests to a domain and an individual spec placed a further expectation on the request for the `Content-Type` header. To our surprise, the `Content-Type` header was mysteriously vanishing.

@mattonrails and I traced it to WebMock and were able to write a failing test and fix the issue with no other failing specs. The spec we wrote is probably not in an ideal location so I'm happy to move it around with your feedback.

If you uncomment our diff in `lib/webmock/rack_response.rb`, you'll see the spec fail with the `Accept` header still present, but the `Content-Type` header missing and unable to be matched against.