Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

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

#2803

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.

Reported by Kamal Fariz · June 15th, 2009 @ 04:52 PM

State: resolved
Milestone: 3.x
Assigned to: nobody
Importance: none

Activity

  1. Jeremy Kemper
    Jeremy Kemper
    • Milestone changed from 2.x to 3.x

    May 4th, 2010 @ 06:48 PM

  2. Dan Pickett
    Dan Pickett
    • Tag changed from 2-3-stable, bug, patch to 2-3-stable, bug, bugmash, patch

    Can a bugmasher verify this behavior in Rails 3 and supply an updated patch if necessary?

    May 9th, 2010 @ 07:13 PM

  3. Kamal Fariz
    Kamal Fariz

    The patch to Rails integration is no longer required. Rack has applied the patch upstream. http://github.com/rack/rack/commit/e0322ed04b419e88a4790f63eb402cdc...

    May 11th, 2010 @ 03:53 AM

  4. Rohit Arondekar
    Rohit Arondekar
    • State changed from new to resolved
    • Importance changed from to

    July 4th, 2010 @ 03:19 AM