Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #10229 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Fix page caching for URLs with a trailing slash

Reported by: devrieda Assigned to: core
Priority: normal Milestone: 2.x
Component: ActionPack Version: edge
Severity: normal Keywords: verified
Cc: chuyeow

Description

Visiting a page cached action for a URL such as: /users/new/

generates the rather useless cache file: public/users/new/.html

This patch chomps the trailing slash to create: public/users/new.html

I realize that tools such as url_for will not generate the slash, but we've often seen other sites link to our pages using a trailing slash. It's rather awkward asking someone to update their link to our site to not include a slash so that our caching works correctly.

Attachments

fix_page_caching_with_trailing_slash.patch (1.8 kB) - added by devrieda on 11/21/07 09:08:15.

Change History

11/21/07 09:08:15 changed by devrieda

  • attachment fix_page_caching_with_trailing_slash.patch added.

11/21/07 12:23:01 changed by chuyeow

  • cc set to chuyeow.

11/24/07 18:29:23 changed by josh

+1

11/26/07 02:37:23 changed by dkubb

+1

11/26/07 06:45:45 changed by mnaberez

  • keywords set to verified.

+1

11/28/07 00:29:46 changed by david

  • status changed from new to closed.
  • resolution set to fixed.

(In [8226]) Added protection from trailing slashes on page caching (closes #10229) [devrieda]