diff --git a/source/vibe/http/internal/http2/exchange.d b/source/vibe/http/internal/http2/exchange.d index b7e66f8..9d8cf18 100644 --- a/source/vibe/http/internal/http2/exchange.d +++ b/source/vibe/http/internal/http2/exchange.d @@ -309,7 +309,9 @@ bool handleHTTP2Request(UStream)(ref HTTP2ConnectionStream!UStream stream, parsed = true; logTrace("persist: %s", req.persistent); //keep_alive = req.persistent; - logDebug("Received %s request on stream ID %d", req.method, stream.streamId); + logDebug("Received request on stream ID %d: %s %s", stream.streamId, req.method, req.requestPath); + foreach (k, v; req.headers.byKeyValue) + logDebugV("%s: %s", k, v); // utility to format the status line auto statusLine = AllocAppender!string(alloc); @@ -447,7 +449,7 @@ bool handleHTTP2Request(UStream)(ref HTTP2ConnectionStream!UStream stream, } } catch (Exception e) { - logDebug("[DATA] "~e.msg); + logException(e, "Failed to send DATA frame"); return; } } diff --git a/source/vibe/http/internal/http2/server.d b/source/vibe/http/internal/http2/server.d index 438bbd7..f3d53ee 100644 --- a/source/vibe/http/internal/http2/server.d +++ b/source/vibe/http/internal/http2/server.d @@ -248,9 +248,11 @@ private void handleHTTP2FrameChain(ConnectionStream)(ConnectionStream stream, TC final switch(st) { case WaitForDataAsyncStatus.waiting: + logTrace("need to wait for more data asynchronously"); return; case WaitForDataAsyncStatus.noMoreData: + logTrace("connection closed by remote side"); stream.finalize(); connection.close(); return; diff --git a/source/vibe/http/server.d b/source/vibe/http/server.d index d48af5b..5e7b49e 100644 --- a/source/vibe/http/server.d +++ b/source/vibe/http/server.d @@ -239,6 +239,7 @@ void handleHTTPConnection(TCPConnection connection, HTTPServerContext context) Nullable!string proto = tls_stream.alpn; if(!proto.isNull && proto == "h2" && (context.m_virtualHosts[0].settings.options & HTTPServerOption.enableHTTP2)) { + logTrace("Using HTTP/2 as requested per ALPN"); HTTP2Settings settings; auto h2context = new HTTP2ServerContext(context, settings); handleHTTP2Connection(tls_stream, connection, h2context);