From ac55b3ca780e11f801d23966c9c896958136e60f Mon Sep 17 00:00:00 2001 From: batrick Date: Mon, 10 Aug 2009 12:51:14 +0000 Subject: [PATCH] Fixed a regexp escape sequence and shortened code. --- nselib/http.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nselib/http.lua b/nselib/http.lua index ea107b63d..dda86f808 100644 --- a/nselib/http.lua +++ b/nselib/http.lua @@ -461,8 +461,7 @@ request = function( host, port, data, options ) local last_header, match, key for number, line in ipairs( header or {} ) do if number == 1 then - local code - _, _, code = string.find( line, "HTTP/%d\.%d (%d+)") + local code = line:match "HTTP/%d%.%d (%d+)"; result.status = tonumber(code) if code then result["status-line"] = line end else