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.

[PATCH] Fix accidental caching of proc objects instead of the content it represents

#2590

Streaming content will return a proc that rack handles just fine, but cache_page expects a string.

This exhibits itself by caching the following instead of the expected file contents:


#<Proc:0x01a10f80@./test/../lib/action_controller/streaming.rb:91>

This can be avoided by setting :stream => false when calling send_file. But the problem only became apparent after we got to production... which is too late IMHO.

It should be noted that this is not an issue in 3.0, due to some more major changes in the rack stack (I think). The patch when applied to 3.0 does not cause any test fails, but neither does just applying the test. Maybe a reversion should be applied to the 3-0 branch?

Patch with tests attached.

Reported by Tom Lea · May 1st, 2009 @ 01:03 AM

State: stale
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. Rohit Arondekar
    Rohit Arondekar
    • State changed from new to stale
    • Importance changed from to

    Marking ticket as stale. If this is still an issue please leave a comment with suggested changes, creating a patch with tests, rebasing an existing patch or just confirming the issue on a latest release or master/branches.

    October 9th, 2010 @ 04:23 AM