I am reading HTTP Header Field Definitions for proper header analysis, and I come across an accept-extension field definition. They are part of the priority of the receiving headers, which gives the following order:
text/html;level=1;param=other // Less specific : text/html;level=1 // Less specific: text/html // Even less specific text/*
I'm not sure what should happen if the client requests text / html; level = 1, but I only have a content provider for text / html. Send text / html content or 406 error (invalid)?
In your example, you will send back 406. If they can also accept the base text / html, they should send this:
Accept: text/html, text/html;level=1
Note that order does not matter, and the most specific always takes precedence.
Source: https://habr.com/ru/post/1335446/More articles:cached Schwartz transform - optimization.NET HttpWebResponse does not provide location header - http-headersCan I manually send 40x HTTP code to a client from an ASP.NET web service method? - httpIs this a safe way to protect against SQL injection? - phpSocial Network Plugin + Rails 3 - pluginsGet address using Geocoder in android - androidIs the language order in the Accept-language HTTP field consistent? - httpHow to ignore all defined file extensions in MVC routing - c #L10N: reliable test data for specific sorting by locale - sortingMVC ignore route - asp.net-mvcAll Articles