This project is archived and is in readonly mode.
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:
- Add a 
Rack::Utils::HeaderHash#replacemethod - 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
- 
        

 - 
        

Dan Pickett May 9th, 2010 @ 07:13 PM
- 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?
 - 
            
        

Kamal Fariz May 11th, 2010 @ 03:53 AM
The patch to Rails integration is no longer required. Rack has applied the patch upstream. http://github.com/rack/rack/commit/e0322ed04b419e88a4790f63eb402cdc...
 - 
        

Rohit Arondekar July 4th, 2010 @ 03:19 AM
- State changed from new to resolved
 - Importance changed from  to 
 
 
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>