Feature #10680

Implement Content Negotiation Support

Added by Robert Lemke about 11 years ago. Updated about 11 years ago.

Should have
Start date:
Due date:
% Done:


Estimated time:
PHP Version:
Has patch:


There is now a use case for content negotiation in FLOW3:

For most requests, content negotiation based on the Accept HTTP header does not make sense because most browsers don't send meaningful information in them (some browsers for example say that they prefer "XML" over "HTML" which the user of course doesn't). However, for REST services it is a handy feature to control the output format by sending a respective Accept header. In some cases this might even be the only way to control the format, for example how else would you GET a resource "http://myhost/customers/" in different formats?

A proper implementation could work like this:

  • if a format is defined through a @format property in the matching route, this format is used
  • if no format has been defined by the route, the Accept header will be analyzed and compared with a list of supported formats by the controller. If another format than "HTML" is accepted by the client and the controller supports it, this format is chosen. If no other accepted format matches the supported formats, HTML is used.

Related issues

Related to TYPO3.Flow - Feature #315: Add "format" support to the Request objectResolvedRobert Lemke2008-02-15

Related to TYPO3.Flow - Feature #37561: Re-implement Accept Header / Content Negotiation supportResolvedRobert Lemke2012-05-29


Updated by Robert Lemke about 11 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF