This project is archived and is in readonly mode.

#2803 ✓resolved
Kamal Fariz

Headers from middleware/Metal are not replaced correctly in integration tests

Reported by Kamal Fariz | June 15th, 2009 @ 04:52 PM | in 3.x

Rails integration uses the Hash#replace method to replace the headers of the response if it comes from Rack Middleware or Rails Metal. Hash#replace bypasses Rack::Utils::HeaderHash's maintenance of an internal @names mapping of keys which causes header lookups to fail.

The options are:

  1. Add a Rack::Utils::HeaderHash#replace method
  2. Patch Rails integration

I've attached a patch for Option 2 which clears and sets the keys and values pairwise. Note that this patch is only valid for 2-3-stable branch as Edge has moved to using more of Rack::Test which does not have this bug.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Pages