return copy;
}
+bool
+HttpRequest::inheritProperties(const HttpMsg *aMsg)
+{
+ const HttpRequest* aReq = dynamic_cast<const HttpRequest*>(aMsg);
+ if (!aReq)
+ return false;
+
+ client_addr = aReq->client_addr;
+#if FOLLOW_X_FORWARDED_FOR
+ indirect_client_addr = aReq->indirect_client_addr;
+#endif
+#if USE_SQUID_EUI
+ client_eui48 = aReq->client_eui48;
+ client_eui64 = aReq->client_eui64;
+#endif
+ my_addr = aReq->my_addr;
+
+ dnsWait = aReq->dnsWait;
+
+#if USE_ADAPTATION
+ adaptHistory_ = aReq->adaptHistory();
+#endif
+#if ICAP_CLIENT
+ icapHistory_ = aReq->icapHistory();
+#endif
+
+ // This may be too conservative for the 204 No Content case
+ // may eventually need cloneNullAdaptationImmune() for that.
+ flags = aReq->flags.cloneAdaptationImmune();
+
+ errType = aReq->errType;
+ errDetail = aReq->errDetail;
+#if USE_AUTH
+ auth_user_request = aReq->auth_user_request;
+#endif
+ clientConnectionManager = aReq->clientConnectionManager;
+ return true;
+}
+
/**
* Checks the first line of an HTTP request is valid
* currently just checks the request method is present.
header.has(HDR_IF_NONE_MATCH);
}
-bool HttpRequest::inheritProperties(const HttpMsg *aMsg)
-{
- const HttpRequest* aReq = dynamic_cast<const HttpRequest*>(aMsg);
- if (!aReq)
- return false;
-
- client_addr = aReq->client_addr;
-#if FOLLOW_X_FORWARDED_FOR
- indirect_client_addr = aReq->indirect_client_addr;
-#endif
-#if USE_SQUID_EUI
- client_eui48 = aReq->client_eui48;
- client_eui64 = aReq->client_eui64;
-#endif
- my_addr = aReq->my_addr;
-
- dnsWait = aReq->dnsWait;
-
-#if USE_ADAPTATION
- adaptHistory_ = aReq->adaptHistory();
-#endif
-#if ICAP_CLIENT
- icapHistory_ = aReq->icapHistory();
-#endif
-
- // This may be too conservative for the 204 No Content case
- // may eventually need cloneNullAdaptationImmune() for that.
- flags = aReq->flags.cloneAdaptationImmune();
-
- errType = aReq->errType;
- errDetail = aReq->errDetail;
-#if USE_AUTH
- auth_user_request = aReq->auth_user_request;
-#endif
- clientConnectionManager = aReq->clientConnectionManager;
- return true;
-}
-
-void HttpRequest::recordLookup(const DnsLookupDetails &dns)
+void
+HttpRequest::recordLookup(const DnsLookupDetails &dns)
{
if (dns.wait >= 0) { // known delay
if (dnsWait >= 0) // have recorded DNS wait before