324379 Change content type after getWriter
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2246 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
1596451908
commit
0b7866e03a
|
@ -25,6 +25,7 @@ jetty-7.2-SNAPSHOT
|
|||
+ 324360 validate input on getResource since loop logic obscures subclass input validation.
|
||||
+ 324369 Implement draft-ietf-hybi-thewebsocketprotocol-01
|
||||
+ 324377 Allow dispatch of ServletRequest and ServletResponse
|
||||
+ 324379 Change content type after getWriter
|
||||
+ JETTY-912 added per exchange timeout api
|
||||
+ JETTY-1245 Do not use direct buffers with NIO SSL
|
||||
+ JETTY-1249 Apply max idle time to all connectors
|
||||
|
|
|
@ -845,13 +845,13 @@ public class Response implements HttpServletResponse
|
|||
}
|
||||
else
|
||||
{
|
||||
_contentType=_mimeType+"charset="+_characterEncoding;
|
||||
_contentType=_mimeType+";charset="+_characterEncoding;
|
||||
_connection.getResponseFields().put(HttpHeaders.CONTENT_TYPE_BUFFER,_contentType);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_contentType=_mimeType+"charset="+_characterEncoding;
|
||||
_contentType=_mimeType+";charset="+_characterEncoding;
|
||||
_connection.getResponseFields().put(HttpHeaders.CONTENT_TYPE_BUFFER,_contentType);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ public class ResponseTest
|
|||
response.setContentType("foo2/bar2");
|
||||
assertEquals("foo2/bar2;charset=ISO-8859-1",response.getContentType());
|
||||
response.setHeader("name","foo");
|
||||
Enumeration en=response.getHeaders("name");
|
||||
Enumeration<?> en=response.getHeaders("name");
|
||||
assertEquals("foo",en.nextElement());
|
||||
assertFalse(en.hasMoreElements());
|
||||
response.addHeader("name","bar");
|
||||
|
@ -104,6 +104,11 @@ public class ResponseTest
|
|||
assertEquals("foo2/bar2;charset=ISO-8859-1",response.getContentType());
|
||||
|
||||
response.recycle();
|
||||
|
||||
response.setContentType("text/xml;charset=ISO-8859-7");
|
||||
response.getWriter();
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
assertEquals("text/html;charset=ISO-8859-7",response.getContentType());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue