Merge remote-tracking branch 'origin/jetty-9.3.x'

This commit is contained in:
Greg Wilkins 2016-01-08 11:39:43 +11:00
commit b26a390ee1
1 changed files with 13 additions and 0 deletions

View File

@ -235,7 +235,20 @@ public class ResponseTest
response.addHeader("Content-Type","application/json");
response.getWriter();
assertEquals("application/json",response.getContentType());
}
@Test
public void testStrangeContentType() throws Exception
{
Response response = newResponse();
assertEquals(null, response.getContentType());
response.recycle();
response.setContentType("text/html;charset=utf-8;charset=UTF-8");
response.getWriter();
assertEquals("text/html;charset=utf-8;charset=UTF-8",response.getContentType());
assertEquals("utf-8",response.getCharacterEncoding().toLowerCase());
}
@Test