From 8b0f87e91cb5930999bac560a44f7e504fe15c27 Mon Sep 17 00:00:00 2001 From: jah Date: Thu, 10 Mar 2011 12:32:27 +0000 Subject: [PATCH] Conditionally write the HTTP etag response header value to the IPv4 and IPv6 Assignments text files, i.e. don't try and write the header value if it wasn't received! --- scripts/whois.nse | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/whois.nse b/scripts/whois.nse index 3ac16d516..1e5e8fc0b 100644 --- a/scripts/whois.nse +++ b/scripts/whois.nse @@ -1769,7 +1769,9 @@ function get_local_assignments_data() local hline = {} hline[#hline+1] = "<" .. os.time() .. ">" hline[#hline+1] = "<" .. http_response.header["last-modified"] .. ">" - hline[#hline+1] = "<" .. http_response.header.etag .. ">" + if http_response.header.etag then + hline[#hline+1] = "<" .. http_response.header.etag .. ">" + end table.insert( file_content, 2, table.concat( hline ) ) write_success, err = write_to_file( file, file_content ) if err then