improved debug

This commit is contained in:
Greg Wilkins 2014-06-10 20:28:52 +02:00
parent d024a46327
commit 6b77226517
3 changed files with 6 additions and 2 deletions

View File

@ -165,6 +165,7 @@ public abstract class BodyParser
{
try
{
LOG.debug("goaway: error="+frame.getError());
return listener.onGoAway(frame);
}
catch (Throwable x)

View File

@ -130,7 +130,7 @@ public class Parser
case COMPLETE:
{
if (LOG.isDebugEnabled())
LOG.debug("Parsed {} frame, synchronous processing", FrameType.from(type));
LOG.debug("Parsed {} frame, synchronous processing: {}", FrameType.from(type),bodyParser);
reset();
break;
}

View File

@ -118,8 +118,11 @@ public class Http2Server
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
response.setHeader("custom","value");
response.sendRedirect("http://www.google.com");
response.setContentType("text/plain");
response.getOutputStream().print("Hello from Jetty HTTP2");
String content = "Hello from Jetty HTTP2\n";
response.setContentLength(content.length());
response.getOutputStream().print(content);
}
};
}