Not true. Content-Encoding is a permissible header for the client to supply. The RFC says: "If the content-coding of an entity in a request message is not acceptable to the origin server, the server SHOULD respond with a status code of 415 (Unsupported Media Type)." - per [Nick Johnson](
Score: 25
Date posted: 7/4/2012

`415 Unsupported Media Type` means the client has *provided* data in a format that the server doesn't support (as indicated by the request's `Content-Type` header). For example, trying to do a `POST` request to create record of type `User` with the resource in format `application/xml` but the server can't process XML requests for that resource type. `406 Not Acceptable` means the incoming request is wanting the response data in a specific format (as indicated by the `Accept` header) which the server can't provide (for example, wanting a record as XML when the server only provides JSON).
Score: 23
Date posted: 4/24/2016

FYI - RFC description of 422: 11.2. 422 Unprocessable Entity The 422 (Unprocessable Entity) status code means the server understands the content type of the request entity (hence a 415(Unsupported Media Type) status code is inappropriate), and the syntax of the request entity is correct (thus a 400 (Bad Request) status code is inappropriate) but was unable to process the contained instructions. For example, this error condition may occur if an XML request body contains well-formed (i.e., syntactically correct), but semantically erroneous, XML instructions.
Score: 17
Date posted: 4/14/2013

@Hoffmann It may have been appropriate for them to respond with 400 Bad Request, or 415 Unsupported Media Type, any 4xx code represents a client error, so could be interpreted that way.
Score: 8
Date posted: 9/13/2019

"Unsupported operand type" message for this.
Score: 6
Date posted: 9/10/2015


© 2021 Search Overflow
Contributions licensed under cc by-sa