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.

expires_now broken

#4154

For Rails 2.3.x:

expires_now is supposed to set the Cache-Control header to "no-cache", but the header is overwritten to "private, max-age=0, must-revalidate". I suspect this is happening in actionpack/lib/action_controller/response.rb#set_conditional_cache_control! However, I don't understand the etag stuff well enough to mess with the code in handle_conditional_get! which is calling set_conditional_cache_control!.

Attached is a patch to the tests for expires_now, which fails.

Reported by Mike Boone · March 11th, 2010 @ 08:42 PM

State: wontfix
Milestone: 2.3.9
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. Mike Boone
    Mike Boone
    • Tag set to 2.3.x, cache-control

    March 11th, 2010 @ 08:43 PM

  2. Mike Boone
    Mike Boone
    • Tag changed from 2.3.x, cache-control to 2.3.x, actioncontroller, cache-control

    March 11th, 2010 @ 08:44 PM

  3. Jeremy Kemper
    Jeremy Kemper
    • Milestone set to 2.3.6
    • State changed from new to open

    Thanks for the failing test, Mike!

    March 12th, 2010 @ 06:05 AM

  4. Denis Odorcic
    Denis Odorcic
    • Tag changed from 2.3.x, actioncontroller, cache-control to 2.3.x, actioncontroller, cache-control, patch

    I've attached a patch for this and the failing test again because the original test had a name conflict.

    March 14th, 2010 @ 10:34 AM

  5. Rizwan Reza
    Rizwan Reza
    • Tag changed from 2.3.x, actioncontroller, cache-control, patch to 2.3.x, actioncontroller, bugmash, cache-control, patch

    May 16th, 2010 @ 02:41 AM

  6. Bastes
    Bastes

    +1

    Looks good, tests good.

    May 16th, 2010 @ 02:56 PM

  7. Anil Wadghule
    Anil Wadghule

    +1 Applies cleanly. Test looks good.

    May 16th, 2010 @ 03:20 PM

  8. Rizwan Reza
    Rizwan Reza
    • Tag changed from 2.3.x, actioncontroller, bugmash, cache-control, patch to 2.3.x, actioncontroller, bugmash-review, cache-control, patch
    • State changed from open to verified

    May 16th, 2010 @ 03:51 PM

  9. José Valim
    José Valim

    Can someone check if this is an issue in Rails 3 (master) as well?

    May 16th, 2010 @ 03:56 PM

  10. Rizwan Reza
    Rizwan Reza
    • Tag changed from 2.3.x, actioncontroller, bugmash-review, cache-control, patch to 2.3.x, actioncontroller, bugmash, cache-control, patch

    May 16th, 2010 @ 04:41 PM

  11. Rizwan Reza
    Rizwan Reza
    • State changed from verified to open

    May 16th, 2010 @ 04:41 PM

  12. pleax
    pleax

    @José Valim: As I can see, tests OdorcicD provided allready in master. And they pass :)

    May 16th, 2010 @ 05:04 PM

  13. José Valim
    José Valim
    • Tag changed from 2.3.x, actioncontroller, bugmash, cache-control, patch to 2.3.x, actioncontroller, cache-control, patch
    • Assigned user set to José Valim

    May 16th, 2010 @ 05:06 PM

  14. Jeremy Kemper
    Jeremy Kemper
    • Milestone changed from 2.3.6 to 2.3.7

    May 23rd, 2010 @ 05:54 PM

  15. Jeremy Kemper
    Jeremy Kemper
    • Milestone changed from 2.3.7 to 2.3.8

    May 24th, 2010 @ 09:40 AM

  16. Jeremy Kemper
    Jeremy Kemper
    • Milestone changed from 2.3.8 to 2.3.9

    May 25th, 2010 @ 11:45 PM

  17. W. Andrew Loe III
    W. Andrew Loe III

    This will break downloads in IE over SSL.

    http://support.microsoft.com/kb/323308

    I ran into this when moving to 2.3.8, the headers changed from:

    Cache-Control: private, max-age=0, must-revalidate <---- this works

    to

    Cache-Control: no-cache <--- this is broken.

    June 22nd, 2010 @ 07:58 PM

  18. José Valim
    José Valim
    • State changed from open to wontfix

    Ok, closing. Since applying this on 2.3 (which is a maintenance branch) will definitely break apps for people relying on the wrong behavior

    June 23rd, 2010 @ 08:13 AM