From 3c986d3544518889924933f74bce5da43df1c982 Mon Sep 17 00:00:00 2001 From: patrik Date: Sun, 29 Jan 2012 15:32:09 +0000 Subject: [PATCH] applied patch by Michael Kohl that fixes a bug in the HTTP redirect code of the http-generator script. --- scripts/http-generator.nse | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/http-generator.nse b/scripts/http-generator.nse index 40e17ce65..e835f1f71 100644 --- a/scripts/http-generator.nse +++ b/scripts/http-generator.nse @@ -50,7 +50,7 @@ local follow_redirects = function(host, port, path, n) local pattern = "^[hH][tT][tT][pP]/1.[01] 30[12]" local response = http.get(host, port, path) - while response['status-line']:match(pattern) and n > 0 do + while (response['status-line'] or ""):match(pattern) and n > 0 do n = n - 1 loc = response.header['location'] response = http.get_url(loc)