From: Petr Špaček Date: Tue, 31 Mar 2020 07:30:18 +0000 (+0200) Subject: http: log requests in verbose mode X-Git-Tag: v5.1.0~21^2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1bcbe488901003d8307ea9166c1a82db9c400376;p=thirdparty%2Fknot-resolver.git http: log requests in verbose mode --- diff --git a/modules/http/http.lua.in b/modules/http/http.lua.in index fa54072e3..6a46ac736 100644 --- a/modules/http/http.lua.in +++ b/modules/http/http.lua.in @@ -222,6 +222,10 @@ local function route(endpoints) local h = assert(stream:get_headers()) local m = h:get(':method') local path = h:get(':path') + if verbose() then + log('[http] %s %s HTTP/%d', m, path, connection.version) + end + -- Upgrade connection to WebSocket local ws = http_websocket.new_from_stream(stream, h) if ws then