Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1473 (closed defect: fixed)

Opened 12 years ago

Last modified 10 years ago

Implement Changes to Content Negotiation system

Reported by: mramm Owned by: percious
Priority: normal Milestone: 2.0b3
Component: TurboGears Version: trunk
Severity: normal Keywords:
Cc:

Description (last modified by mramm) (diff)

We need to modify the expose decorator in pylons to set overide the accept headers if there is a file extension. So calling /index.html means you want html back while index.xhtml means you want xhtml, and .rss means you want xml/rss .json means you want JSON etc.

The way it works now is that accept headers are overridden by tg_format and this should still work, but be depricated in favor of file extensions.

This makes for much nicer URL's and allows you to request specific return types even on http get requests.

Change History

comment:1 Changed 11 years ago by mramm

  • Description modified (diff)

comment:2 Changed 11 years ago by mramm

  • Priority changed from normal to high

comment:3 Changed 11 years ago by mramm

  • Milestone changed from 2.0 to 2.0-preview

comment:4 Changed 11 years ago by mramm

Pylons just grew some helpful new mimetype features:

 http://pylonshq.com/project/pylonshq/changeset/1293%3A28eed5438061

comment:5 Changed 11 years ago by khorn

Dont' forget the standard library mimetypes module...

An example of how this can be used is here:  http://pythonpaste.org/webob/file-example.html

we might be able to do something similar, at least as a stopgap until we have time/resources to do something else

comment:6 Changed 11 years ago by khorn

I expect #1691 will need to be fixed before much progress can be made here, since in some cases the content-type header is being set twice

comment:7 Changed 11 years ago by mramm

  • Priority changed from high to normal

comment:8 Changed 11 years ago by mramm

  • Milestone changed from 2.0-preview to 2.0

comment:9 Changed 11 years ago by mramm

  • Milestone changed from 2.0 to 2.0-preview-2

comment:10 Changed 11 years ago by mramm

I expect we will want to work on this ticket at the PyCon2008 sprint

comment:11 Changed 11 years ago by mramm

  • Milestone changed from 2.0-preview-2 to 2.0

comment:12 Changed 10 years ago by jorge.vargas

  • Milestone changed from 2.0 to 2.0b1

This is a very nice feature I'll like to see sooner than later.

comment:13 Changed 10 years ago by mramm

  • Milestone changed from 2.0b1 to 2.0

comment:14 Changed 10 years ago by percious

  • Owner changed from anonymous to percious

comment:15 Changed 10 years ago by percious

  • Status changed from new to closed
  • Resolution set to fixed

fixed in r6045. documented in r6083.

comment:16 Changed 10 years ago by mramm

  • Milestone changed from 2.0 to 2.0b3
Note: See TracTickets for help on using tickets.