Fix #5605 Unblock non container Threads

test and fixes for the write side.
This commit is contained in:
gregw 2021-02-02 17:55:15 +01:00
parent 0d85c7d220
commit a110fc3468
2 changed files with 5 additions and 0 deletions

View File

@ -1812,7 +1812,10 @@ public class Request implements HttpServletRequest
public void setMetaData(org.eclipse.jetty.http.MetaData.Request request)
{
if (_metaData == null)
{
_input.recycle();
_channel.getResponse().getHttpOutput().reopen();
}
_metaData = request;
setMethod(request.getMethod());

View File

@ -493,6 +493,7 @@ public class ResponseTest
assertEquals("foo2/bar2;charset=utf-8", response.getContentType());
response.recycle();
response.reopen();
response.setCharacterEncoding("utf16");
response.setContentType("text/html; charset=utf-8");
@ -505,6 +506,7 @@ public class ResponseTest
assertEquals("text/xml;charset=utf-8", response.getContentType());
response.recycle();
response.reopen();
response.setCharacterEncoding("utf-16");
response.setContentType("foo/bar");
assertEquals("foo/bar;charset=utf-16", response.getContentType());