This project is archived and is in readonly mode.

#2590 ✓stale
Tom Lea

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

Reported by Tom Lea | May 1st, 2009 @ 01:03 AM | in 3.x

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:


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.

Comments and changes to this ticket

  • Jeremy Kemper

    Jeremy Kemper May 4th, 2010 @ 06:48 PM

    • Milestone changed from 2.x to 3.x
  • Rohit Arondekar

    Rohit Arondekar October 9th, 2010 @ 04:23 AM

    • 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.

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=""></a>