]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
When cloning, clone the pointer to the body pipe. The caller may need to
authorAlex Rousskov <rousskov@measurement-factory.com>
Fri, 16 May 2008 00:20:39 +0000 (18:20 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Fri, 16 May 2008 00:20:39 +0000 (18:20 -0600)
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
src/HttpRequest.cc

index 0865ddd2bf5302e9d90cc6c125682d2d1671281a..7fb8050ab7fa5a57c0f1503e5045ee5167aad9cc 100644 (file)
@@ -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;
index 2d54e7fabd23ae84e7336324aee41b8797c96c25..a6259c8686d6485ac74164e4b63ddf78e1c9ae11 100644 (file)
@@ -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