From: Alex Rousskov Date: Fri, 16 May 2008 00:20:39 +0000 (-0600) Subject: When cloning, clone the pointer to the body pipe. The caller may need to X-Git-Tag: SQUID_3_1_0_1~45^2~11^2~24^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8d990f06cb28f2b7e0e614f31a58fc6c39dd09d;p=thirdparty%2Fsquid.git 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". --- 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