From f8d990f06cb28f2b7e0e614f31a58fc6c39dd09d Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Thu, 15 May 2008 18:20:39 -0600 Subject: [PATCH] When cloning, clone the pointer to the body pipe. The caller may need to make pipe adjustments, depending on how the body will be used. Note that we cannot clone the body or even the pipe. We can only share it between the clone and "cloner". --- src/HttpReply.cc | 2 ++ src/HttpRequest.cc | 1 + 2 files changed, 3 insertions(+) diff --git a/src/HttpReply.cc b/src/HttpReply.cc index 0865ddd2bf..7fb8050ab7 100644 --- a/src/HttpReply.cc +++ b/src/HttpReply.cc @@ -562,6 +562,8 @@ HttpReply::clone() const rep->hdr_sz = hdr_sz; rep->http_ver = http_ver; rep->pstate = pstate; + rep->body_pipe = body_pipe; + rep->protocol = protocol; rep->sline = sline; return rep; diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc index 2d54e7fabd..a6259c8686 100644 --- a/src/HttpRequest.cc +++ b/src/HttpRequest.cc @@ -150,6 +150,7 @@ HttpRequest::clone() const copy->hdr_sz = hdr_sz; copy->http_ver = http_ver; copy->pstate = pstate; // TODO: should we assert a specific state here? + copy->body_pipe = body_pipe; strncpy(copy->login, login, sizeof(login)); // MAX_LOGIN_SZ strncpy(copy->host, host, sizeof(host)); // SQUIDHOSTNAMELEN -- 2.47.2