From 47bbbfdcea01ce602cff174aeff969a872386f14 Mon Sep 17 00:00:00 2001 From: batrick Date: Fri, 13 Aug 2010 18:40:00 +0000 Subject: [PATCH] Fixed some local declarations. --- nselib/http.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/nselib/http.lua b/nselib/http.lua index 4980611fe..1d79cc9f4 100644 --- a/nselib/http.lua +++ b/nselib/http.lua @@ -928,14 +928,12 @@ local build_request = function(host, port, method, path, options) -- Add any other options into the local copy. table_augment(mod_options, options) - local request_line, header, body - request_line = string.format("%s %s HTTP/1.1", method, path) - header = {} - local name, value + local request_line = string.format("%s %s HTTP/1.1", method, path) + local header = {} for name, value in pairs(mod_options.header) do header[#header + 1] = string.format("%s: %s", name, value) end - body = mod_options.content and mod_options.content or "" + local body = mod_options.content and mod_options.content or "" return request_line .. "\r\n" .. stdnse.strjoin("\r\n", header) .. "\r\n\r\n" .. body end