From c98b77bd65df929446841cbd56d458d1973b3556 Mon Sep 17 00:00:00 2001 From: nnposter Date: Sun, 1 Dec 2024 14:36:47 +0000 Subject: [PATCH] Preserve global pipeline connection options. Closes #2941 --- nselib/comm.lua | 1 + nselib/http.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/nselib/comm.lua b/nselib/comm.lua index ea380fa9b..d7d6f6285 100644 --- a/nselib/comm.lua +++ b/nselib/comm.lua @@ -247,6 +247,7 @@ end -- @param data The first data payload of the connection. Optional if -- opts.recv_before is true. -- @param opts Options, such as timeout +-- Note that opts.proto will get set to correctOpt (see below) -- @return sd The socket descriptor, or nil on error -- @return response The response received for the payload, or an error message -- @return correctOpt Correct option for connection guess diff --git a/nselib/http.lua b/nselib/http.lua index f423287de..3e27fcbbd 100644 --- a/nselib/http.lua +++ b/nselib/http.lua @@ -2002,7 +2002,7 @@ function pipeline_go(host, port, all_requests) local req = all_requests[1] req.options.header = force_header(req.options.header, "Connection", "keep-alive") local reqstr = build_request(host, port, req.method, req.path, req.options) - local socket, partial, bopt = comm.tryssl(host, port, reqstr, pipeline_comm_opts) + local socket, partial, bopt = comm.tryssl(host, port, reqstr, tableaux.tcopy(pipeline_comm_opts)) if not socket then return nil end