Nmap Development mailing list archives
[PATCH] http.lua updated in line with stdnse.make_buffer()
From: jah <jah () zadkiel plus com>
Date: Sat, 21 Jun 2008 16:51:05 +0100
Hi, Attached is a patch for http.lua to use the updated make_buffer function which now returns a line as its first argument or returns nil, err Regards, jah
--- http.lua.orig 2008-06-21 16:43:26.875000000 +0100
+++ http.lua 2008-06-21 12:34:13.875000000 +0100
@@ -104,13 +104,13 @@
local buffer = stdnse.make_buffer( socket, "\r?\n" )
- local status, line, _
+ local line, _
local header, body = {}, {}
-- header loop
while true do
- status, line = buffer()
- if (not status or line == "") then break end
+ line = buffer()
+ if not line then break end
table.insert(header,line)
end
@@ -142,8 +142,8 @@
-- body loop
while true do
- status, line = buffer()
- if (not status) then break end
+ line = buffer()
+ if not line then break end
table.insert(body,line)
end
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- [PATCH] http.lua updated in line with stdnse.make_buffer() jah (Jun 21)
- Re: [PATCH] http.lua updated in line with stdnse.make_buffer() Patrick Donnelly (Jun 21)
- Re: [PATCH] http.lua updated in line with stdnse.make_buffer() jah (Jun 21)
- Re: [PATCH] http.lua updated in line with stdnse.make_buffer() Patrick Donnelly (Jun 21)
- Re: [PATCH] http.lua updated in line with stdnse.make_buffer() jah (Jun 21)
- Re: [PATCH] http.lua updated in line with stdnse.make_buffer() Patrick Donnelly (Jun 21)
