Bug #38662
Media type not supported should throw 415 rather than 406
Status: | Closed | Start date: | 2012-07-05 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Adrian Föder | % Done: | 0% |
|
Category: | MVC | |||
Target version: | TYPO3 Flow Base Distribution - 1.1 | |||
PHP Version: | Complexity: | |||
Has patch: | No | Affected Flow version: | FLOW3 1.1.0 rc 1 |
Description
In the AbstractController there's a check for supported media types. If this does not match, currently a 406 is thrown but should be 415.
History
#1 Updated by Gerrit Code Review about 3 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12620
#2 Updated by Adrian Föder about 3 years ago
- Subject changed from Nedia type not supported should throw 415 rather than 406 to Media type not supported should throw 415 rather than 406
#3 Updated by Karsten Dambekalns about 3 years ago
While this may be more intuitive, it is wrong. From http://stackoverflow.com/questions/3294483/http-406-and-415-error-codes comes this nice explanation:
- 406 is returned by the server when it can't respond based on accepting the request headers (ie they have an Accept header which states they only want XML).
- 415 is returned by the server when the entity sent in a request (content in a POST or PUT) has an unsupported mediatype (i.e. they sent XML).
so.. 406 when you can't send what they want, 415 when they send what you don't want.
#4 Updated by Karsten Dambekalns about 3 years ago
- Status changed from Under Review to Closed