From de903610730de41edf877e5d89fa169d7a504783 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 18 Aug 2010 17:55:27 +0000 Subject: [PATCH] Fix a bug in header parsing in http.lua. After reading a block of non-whitespace characters, the position counter was advanced one past where it was supposed to be. This didn't have any bad effect when the server used CRLF to separate header fields, because it ate the CR and still recognized LF as ending the field. But it concatenated multiple header fields when the server only used LF to separate them. --- nselib/http.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/nselib/http.lua b/nselib/http.lua index 5cb0528d1..01db39e94 100644 --- a/nselib/http.lua +++ b/nselib/http.lua @@ -521,7 +521,6 @@ local function parse_header(header, response) pos = pos + 1 end words[#words + 1] = string.sub(header, s, pos - 1) - pos = pos + 1 pos = skip_lws(header, pos) end