Ticket #1473 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

Implement Changes to Content Negotiation system

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

Description (Last modified by mramm)

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

01/09/08 19:11:18 changed by mramm

  • description changed.

01/13/08 08:08:36 changed by mramm

  • priority changed from normal to high.

01/13/08 08:15:13 changed by mramm

  • milestone changed from 2.0 to 2.0-preview.

01/13/08 22:17:08 changed by mramm

Pylons just grew some helpful new mimetype features:

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

01/14/08 13:35:25 changed 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

01/16/08 08:17:12 changed 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

02/04/08 15:41:59 changed by mramm

  • priority changed from high to normal.

02/23/08 12:33:09 changed by mramm

  • milestone changed from 2.0-preview to 2.0.

02/26/08 12:27:07 changed by mramm

  • milestone changed from 2.0 to 2.0-preview-2.

02/26/08 12:27:44 changed by mramm

I expect we will want to work on this ticket at the PyCon?2008 sprint

07/06/08 20:49:38 changed by mramm

  • milestone changed from 2.0-preview-2 to 2.0.

12/12/08 15:31:02 changed 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.

12/15/08 15:11:02 changed by mramm

  • milestone changed from 2.0b1 to 2.0.

01/10/09 09:24:33 changed by percious

  • owner changed from anonymous to percious.

01/11/09 19:28:52 changed by percious

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

fixed in r6045. documented in r6083.

01/12/09 12:30:19 changed by mramm

  • milestone changed from 2.0 to 2.0b3.