Add "format" support to the Request object
|Priority:||Must have||Due date:|
|Assignee:||Robert Lemke||% Done:||
|Target version:||TYPO3 Flow Base Distribution - 1.0 alpha 11|
The Request object (mainly WebRequest) should contain information about the requested format. Currently it only provides a controller and an action name.
The default format would be "html" for web requests and "text" for CLI requests.
The router which extracts information for building a web request could determine the requested format from two sources:
- the file extension (.html, .txt, .pdf, .js, .json, .atom, .rss, .xml etc.)
- the HTTP headers (content negotiation) - this is mainly for AJAX requests
|related to TYPO3.Flow - Feature #10680: Implement Content Negotiation Support||Resolved||2010-11-08|
Updated by Robert Lemke almost 5 years ago
- % Done changed from 0 to 50
This was mainly addressed by r1077 (added support for format).
What's still missing is the analysis of the HTTP headers / the content negotiation.
Updated by Karsten Dambekalns over 4 years ago
- Priority changed from Should have to Must have
- Target version set to 1.0 alpha 1
Updated by Robert Lemke over 2 years ago
- Status changed from Accepted to Resolved
- % Done changed from 50 to 100
Okay, as it seems the Accept header is not used consistently and correctly among different browser (see http://www.gethifi.com/blog/browser-rest-http-accept-headers) and that even if it was, there are a number of reasons why multiple URLs for different formats is the better design choice (see also http://www.artima.com/weblogs/viewpost.jsp?thread=192218).
Therefore I drop the idea of built-in content negotiation, at least for now.