From d390452e36c037a0f89c97d657b314a999985d1b Mon Sep 17 00:00:00 2001 From: david Date: Thu, 21 Jan 2010 00:35:12 +0000 Subject: [PATCH] Fix a string format error in the HTTP dechunking code. --- nselib/http.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nselib/http.lua b/nselib/http.lua index 75c60712e..a17885569 100644 --- a/nselib/http.lua +++ b/nselib/http.lua @@ -344,7 +344,9 @@ local function recv_chunked(s, partial) chunks[#chunks + 1] = chunk line, partial = recv_line(s, partial) - if not line or not string.match(line, "^\r?\n") then + if not line then + return nil, string.format("Didn't find CRLF after chunk-data.") + elseif not string.match(line, "^\r?\n") then return nil, string.format("Didn't find CRLF after chunk-data; got %q.", line) end until chunk_size == 0