From eb1ed93540233f47dc6f012374e1894c9b32bebc Mon Sep 17 00:00:00 2001 From: nnposter Date: Sun, 19 Oct 2025 19:13:24 +0000 Subject: [PATCH] Skip over empty content encoding placeholders --- nselib/http.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nselib/http.lua b/nselib/http.lua index 4acbe28f6..2e3a3c61f 100644 --- a/nselib/http.lua +++ b/nselib/http.lua @@ -858,7 +858,10 @@ local decode_body = function (body, encodings, maxlen) local undecoded = tableaux.tcopy(encodings) while #undecoded > 0 do local enc = undecoded[1]:lower() - if enc == "identity" then + if enc == "" then + -- do nothing (empty encoding placeholder) + table.remove(undecoded, 1) + elseif enc == "identity" then -- do nothing table.insert(decoded, table.remove(undecoded, 1)) elseif enc == "gzip" and have_zlib then