request->myportname = conn->port->name;
request->http_ver = http_ver;
+ // Link this HttpRequest to ConnStateData relatively early so the following complex handling can use it
+ // TODO: this effectively obsoletes a lot of conn->FOO copying. That needs cleaning up later.
+ request->clientConnectionManager = conn;
+
if (request->header.chunked()) {
chunked = true;
} else if (request->header.has(HDR_TRANSFER_ENCODING)) {
debugs(88, 5, "clientReplyContext::processExpired : lastmod " << entry->lastmod );
http->storeEntry(entry);
assert(http->out.offset == 0);
-
- http->request->clientConnectionManager = http->getConn();
+ assert(http->request->clientConnectionManager == http->getConn());
/*
* A refcounted pointer so that FwdState stays around as long as
if (http->flags.internal)
r->protocol = AnyP::PROTO_INTERNAL;
- r->clientConnectionManager = http->getConn();
+ assert(r->clientConnectionManager == http->getConn());
/** Start forwarding to get the new object from network */
FwdState::fwdStart(http->getConn() != NULL ? http->getConn()->fd : -1,