From 53c5e64c435eab2d9b3108f2d50294272950cbed Mon Sep 17 00:00:00 2001 From: joao Date: Sun, 5 Jul 2009 09:59:02 +0000 Subject: [PATCH] Fixed local/global issues with some vars --- nselib/http.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nselib/http.lua b/nselib/http.lua index ebce36513..8e7cec71d 100644 --- a/nselib/http.lua +++ b/nselib/http.lua @@ -215,10 +215,10 @@ request = function( host, port, data, options ) header = stdnse.strsplit( "\r?\n", header ) - local line, _ + local line, _, value -- build nicer table for header - local last_header, match + local last_header, match, key for number, line in ipairs( header or {} ) do if number == 1 then local code @@ -244,8 +244,8 @@ request = function( host, port, data, options ) end end - body_delim = ( body:match( "\r\n" ) and "\r\n" ) or - ( body:match( "\n" ) and "\n" ) or nil + local body_delim = ( body:match( "\r\n" ) and "\r\n" ) or + ( body:match( "\n" ) and "\n" ) or nil -- handle chunked encoding if result.header['transfer-encoding'] == 'chunked' and type( body_delim ) == "string" then