Implicit String Conversion Of Headers
Reported by Andre Ben Hamou | July 5th, 2010 @ 02:20 PM
In a Merb app, we are doing this...
redirect(some_dm_object.url) # a URI object
Merb, in turn, does this...
headers['Location'] = url # the same URI object
And so ends up passing a headers hash up the rack chain like this...
{"Location"=>#<Addressable::URI:0x85b4eb98 URI:http://example.org>, "Content-Type"=>"text/html; charset=utf-8"}
Whereas Mongrel eventually emits this redirect without problem, Thin halts with an empty response. I suspect Thin should be calling to_s on all header values unless there's something in the documentation that mandates all such conversion should occur before Thin sees the values.
No comments found
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป