From 54543b303c69a9610939ea28f2f0f99d31a0fb73 Mon Sep 17 00:00:00 2001 From: dmiller Date: Fri, 10 Apr 2015 12:56:05 +0000 Subject: [PATCH] Clean up some documentation regarding http redirects --- nselib/http.lua | 13 +++++++------ scripts/http-title.nse | 6 ++---- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/nselib/http.lua b/nselib/http.lua index 2a38f5d6b..6d375347c 100644 --- a/nselib/http.lua +++ b/nselib/http.lua @@ -51,12 +51,13 @@ -- for them. -- -- The response to each function is typically a table with the following keys: --- status-line: The HTTP status line; for example, "HTTP/1.1 200 OK" (note: this is followed by a newline). In case of an error, a description will be provided in this line. --- status: The HTTP status value; for example, "200". If an error occurs during a request, then this value is going to be nil. --- header: A table of header values, where the keys are lowercase and the values are exactly what the server sent --- rawheader: A list of header values as "name: value" strings, in the exact format and order that the server sent them --- cookies: A list of cookies that the server is sending. Each cookie is a table containing the keys name, value, and path. This table can be sent to the server in subsequent responses in the options table to any function (see below). --- body: The body of the response +-- * status-line: The HTTP status line; for example, "HTTP/1.1 200 OK" (note: this is followed by a newline). In case of an error, a description will be provided in this line. +-- * status: The HTTP status value; for example, "200". If an error occurs during a request, then this value is going to be nil. +-- * header: A table of header values, where the keys are lowercase and the values are exactly what the server sent +-- * rawheader: A list of header values as "name: value" strings, in the exact format and order that the server sent them +-- * cookies: A list of cookies that the server is sending. Each cookie is a table containing the keys name, value, and path. This table can be sent to the server in subsequent responses in the options table to any function (see below). +-- * body: The body of the response +-- * location: a list of the locations of redirects that were followed. -- -- Many of the functions optionally allow an 'options' table. This table can alter the HTTP headers -- or other values like the timeout. The following are valid values in 'options' (note: not all diff --git a/scripts/http-title.nse b/scripts/http-title.nse index eff9f3083..1e30c4d89 100644 --- a/scripts/http-title.nse +++ b/scripts/http-title.nse @@ -7,10 +7,8 @@ local string = require "string" description = [[ Shows the title of the default page of a web server. -The script will follow no more than one HTTP redirect, and only if the -redirection leads to the same host. The script may send a DNS query to -determine whether the host the redirect leads to has the same IP address as the -original target. +The script will follow up to 5 HTTP redirects, using the default rules in the +http library. ]] ---