debug improvements from nghttp2 testing
This commit is contained in:
parent
0592ecf3e9
commit
5456de2160
|
@ -40,6 +40,7 @@ import javax.servlet.http.HttpSession;
|
|||
|
||||
import org.eclipse.jetty.alpn.ALPN;
|
||||
import org.eclipse.jetty.alpn.server.ALPNServerConnectionFactory;
|
||||
import org.eclipse.jetty.http2.server.HTTP2CServerConnectionFactory;
|
||||
import org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory;
|
||||
import org.eclipse.jetty.jmx.MBeanContainer;
|
||||
import org.eclipse.jetty.server.HttpConfiguration;
|
||||
|
@ -86,7 +87,7 @@ public class Http2Server
|
|||
http_config.setSendServerVersion(true);
|
||||
|
||||
// HTTP Connector
|
||||
ServerConnector http = new ServerConnector(server,new HttpConnectionFactory(http_config));
|
||||
ServerConnector http = new ServerConnector(server,new HttpConnectionFactory(http_config), new HTTP2CServerConnectionFactory(http_config));
|
||||
http.setPort(8080);
|
||||
server.addConnector(http);
|
||||
|
||||
|
|
|
@ -1308,7 +1308,8 @@ public class Request implements HttpServletRequest
|
|||
@Override
|
||||
public String getRequestURI()
|
||||
{
|
||||
return _metadata.getURI().getPath();
|
||||
MetaData metadata = _metadata;
|
||||
return (metadata==null)?null:_metadata.getURI().getPath();
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
|
|
@ -495,7 +495,7 @@ public class Server extends HandlerWrapper implements Attributes
|
|||
final Response response=connection.getResponse();
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(request.getDispatcherType()+" "+request.getMethod()+" "+target+" on "+connection);
|
||||
LOG.debug("{} on {}{}",request.getDispatcherType(),connection,"\n"+request.getMethod()+" "+request.getHttpURI()+"\n"+request.getHttpFields());
|
||||
|
||||
if ("*".equals(target))
|
||||
{
|
||||
|
@ -507,7 +507,7 @@ public class Server extends HandlerWrapper implements Attributes
|
|||
handle(target, request, request, response);
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("RESPONSE "+target+" "+connection.getResponse().getStatus()+" handled="+request.isHandled());
|
||||
LOG.debug("RESPONSE for {} h={}{}",target,request.isHandled(),"\n"+response.getStatus()+" "+response.getReason()+"\n"+response.getHttpFields());
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
|
Loading…
Reference in New Issue