This commit is contained in:
Greg Wilkins 2017-01-12 10:51:31 +11:00
parent 73609ff7a6
commit 0d45c412e9
2 changed files with 15 additions and 10 deletions

View File

@ -216,7 +216,10 @@ public class DumpHandler extends AbstractHandler.ErrorDispatchHandler
}
catch(IOException e)
{
e.printStackTrace();
if (LOG.isDebugEnabled())
LOG.warn(e);
else
LOG.warn(e.toString());
writer.write(e.toString());
}
}

View File

@ -582,16 +582,18 @@ public class HttpConnectionTest
checkContains(response,offset,"12345");
offset=0;
Log.getLogger(DumpHandler.class).info("Expecting java.io.UnsupportedEncodingException");
response=connector.getResponse("GET /R1 HTTP/1.1\r\n"+
"Host: localhost\r\n"+
"Transfer-Encoding: chunked\r\n"+
"Content-Type: text/plain; charset=unknown\r\n"+
"Connection: close\r\n"+
"\r\n"+
"5;\r\n"+
"12345\r\n"+
"0;\r\n" +
"\r\n");
"Host: localhost\r\n"+
"Transfer-Encoding: chunked\r\n"+
"Content-Type: text/plain; charset=unknown\r\n"+
"Connection: close\r\n"+
"\r\n"+
"5;\r\n"+
"12345\r\n"+
"0;\r\n" +
"\r\n");
offset = checkContains(response,offset,"HTTP/1.1 200");
offset = checkContains(response,offset,"encoding=unknown");
offset = checkContains(response,offset,"/R1");