Feature #37561

Re-implement Accept Header / Content Negotiation support

Added by Robert Lemke almost 2 years ago. Updated almost 2 years ago.

Status:Resolved Start date:2012-05-29
Priority:Should have Due date:
Assignee:Robert Lemke % Done:

100%

Category:Http
Target version:TYPO3 Flow Base Distribution - 1.1 beta 2
PHP Version:5.3 Complexity:medium
Has patch:No
Votes: 0

Description

The older implementation is fairly limited to a single specific media type and also uses the old MIME terminology.

An improved implementation should be

  • well integrated into the new HTTP support
  • consider Quality Values while analyzing the Accept header
  • use the new Internet Media Type terminology
  • well tested

Related issues

related to TYPO3.Flow - Feature #10680: Implement Content Negotiation Support Resolved 2010-11-08

Associated revisions

Revision 03b6d859
Added by Robert Lemke almost 2 years ago

[!!!][FEATURE] Content Negotiation for Media Types

This improves the support for detecting the Media
Type (that is, "format" in an ActionRequest context)
based on the request's Accept header.

This implementation supports Quality Values and Media
Ranges as specified in RFC 2616.

The way to define the supported formats of a controller
has changed: Previously a class property $supportedFormats
contained a list of filename extensions which would be
supported. This property is not supported anymore.
Instead, controllers may now specify a list of IANA
Internet Media Types in a property $supportedMediaTypes.

The default setting for these supported media types
in ActionController is "text/html". You'll need to adjust
your controllers accordingly if you relied on the
$supportedFormats feature.

Also note that the format in ActionRequest is now NULL
by default. The ActionController makes sure to set the
correct format, but if you created your own ActionRequest
for a special purpose, you need to take care of setting
it yourself.

Change-Id: I7d753155aa72f41e3df85b076e8067bcbfe7ac04
Resolves: #37561
Releases: 1.1, 1.2

Revision 29618c52
Added by Robert Lemke almost 2 years ago

[!!!][FEATURE] Content Negotiation for Media Types

This improves the support for detecting the Media
Type (that is, "format" in an ActionRequest context)
based on the request's Accept header.

This implementation supports Quality Values and Media
Ranges as specified in RFC 2616.

The way to define the supported formats of a controller
has changed: Previously a class property $supportedFormats
contained a list of filename extensions which would be
supported. This property is not supported anymore.
Instead, controllers may now specify a list of IANA
Internet Media Types in a property $supportedMediaTypes.

The default setting for these supported media types
in ActionController is "text/html". You'll need to adjust
your controllers accordingly if you relied on the
$supportedFormats feature.

Also note that the format in ActionRequest is now NULL
by default. The ActionController makes sure to set the
correct format, but if you created your own ActionRequest
for a special purpose, you need to take care of setting
it yourself.

Change-Id: I7d753155aa72f41e3df85b076e8067bcbfe7ac04
Resolves: #37561
Releases: 1.1, 1.2

History

Updated by Gerrit Code Review almost 2 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11683

Updated by Gerrit Code Review almost 2 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11683

Updated by Gerrit Code Review almost 2 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11683

Updated by Gerrit Code Review almost 2 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11683

Updated by Gerrit Code Review almost 2 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11683

Updated by Gerrit Code Review almost 2 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11683

Updated by Gerrit Code Review almost 2 years ago

Patch set 7 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11683

Updated by Robert Lemke almost 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Updated by Gerrit Code Review almost 2 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch FLOW3-1.1 has been pushed to the review server.
It is available at http://review.typo3.org/11727

Updated by Gerrit Code Review almost 2 years ago

Patch set 2 for branch FLOW3-1.1 has been pushed to the review server.
It is available at http://review.typo3.org/11727

Updated by Gerrit Code Review almost 2 years ago

Patch set 3 for branch FLOW3-1.1 has been pushed to the review server.
It is available at http://review.typo3.org/11727

Updated by Gerrit Code Review almost 2 years ago

Patch set 4 for branch FLOW3-1.1 has been pushed to the review server.
It is available at http://review.typo3.org/11727

Updated by Robert Lemke almost 2 years ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF