This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Tue Jun 02 13:33:22 -0700 2009 | |
| |
LICENSE | Thu May 21 08:12:27 -0700 2009 | |
| |
README | Wed Jun 03 06:34:00 -0700 2009 | |
| |
Rakefile | Mon Jun 08 13:11:16 -0700 2009 | |
| |
examples/ | Mon Jun 08 13:10:44 -0700 2009 | |
| |
lib/ | Mon Jun 08 13:03:03 -0700 2009 | |
| |
rack-abstract-format.gemspec | Mon Jun 08 13:11:16 -0700 2009 | |
| |
test/ | Mon Jun 08 13:03:03 -0700 2009 |
README
===== Summary Strips the extension from the requested path (env['PATH_INFO']), casts it to media type, and prepends it to env['HTTP_ACCEPT']. This allows dealing with path information separately from format information, which are often different concerns. This is especially useful when dealing with routes as it allows a resource to always point to the same action independently from the requested format. ===== Usage require 'rack' require 'rack/abstract_format' use Rack::AbstractFormat run app The request: GET /path/resource.xml Accept: text/html will become: GET /path/resource env['HTTP_ACCEPT'] #=> 'application/xml,text/html'







