spring-framework/org.springframework.web.ser...
Rossen Stoyanchev 63e235f215 SPR-8750 Refine 'Content-Type' update in MockHttpServletRequest/Response.
The initial solution kept these three in full sync at all times:
contentType field, characterEncoding field, 'Content-Type' header.
That is correct behavior, however it breaks existing tests that rely
on contentType and characterEncoding being equal to exactly what 
they were set to.

For example, consider:
response.setContentType("text/plain");
response.setCharacterEncoding("UTF-8");

Ideally both contentType and the 'Content-Type' header would now be
"text/plain;charset=UTF-8". However, existing tests would expect 
that contentType is equal to "text/plain".

To avoid breaking existing tests, contentType and characterEncoding
will continue to be equal to exactly what they were set to while
the 'Content-Type' header will always include both the content 
type and the charset.

The only exception to this rule is when a 'Content-Type' header
is set explicitly, the contentType and characterEncoding fields will 
be updated accordingly, possibly overriding the existing values.
2011-11-17 15:07:15 +00:00
..
.settings ModelAndViewContainer related refinements 2011-04-07 18:09:28 +00:00
src SPR-8750 Refine 'Content-Type' update in MockHttpServletRequest/Response. 2011-11-17 15:07:15 +00:00
.classpath [SPR-8222] Upgraded to JUnit 4.9. 2011-08-30 13:16:12 +00:00
.project
build.xml
ivy.xml moved OpenSessionInViewTests back to orm module 2011-07-26 01:07:59 +00:00
pom.xml Update Servlet 3.0 dependency in webmvc pom 2011-08-24 19:05:45 +00:00
template.mf
web-servlet.iml moved OpenSessionInViewTests back to orm module 2011-07-26 00:46:07 +00:00