Add HttpHeaders getter and setter for Content-Language [SPR-14536] #19105
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
Daniel Fernández opened SPR-14536 and commented
Now that content negotiation is in place at the
View
/ViewResolver
mechanism and thereforeView
implementations don't need to manually create theContent-Type
HTTP header, it would be nice to have a similar mechanism that avoided the manual creation of theContent-Language
header.The current code at the reactive version of
ThymeleafView
(see here) does something like:However, in Spring MVC thanks to the
HttpServletResponse#setLocale(Locale)
method, all it had to do is:It's not that creating this header is extremely ugly code, but anyway IMHO it would be great if Spring Reactive included some kind of higher-level mechanism for setting this
Content-Language
that keptView
implementations from having to create it manually.Affects: 5.0 M1
Issue Links:
Referenced from: commits 36da299
The text was updated successfully, but these errors were encountered: