From: Christos Tsantilas Date: Thu, 20 Jun 2013 19:21:02 +0000 (+0300) Subject: Redirector helpers related changes X-Git-Tag: SQUID_3_4_0_1~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=95c0dbfc9042a76ba64157be4741fe9cc54e57f4;p=thirdparty%2Fsquid.git Redirector helpers related changes - The redirectStateData handlers requires the HelperReply::Okay helper reply result code else will drop the helper reply, but we are always pass to them the HelperReply::Unknown reply result code - The NotePairs are not support "=" operator. This patch replaces a such command using the NotePairs::append member, and also adds unimplemented private = operator and copy constructor to prevent developers from using it. --- diff --git a/src/Notes.h b/src/Notes.h index 2f67cbd93c..ce9b47fbce 100644 --- a/src/Notes.h +++ b/src/Notes.h @@ -122,6 +122,7 @@ public: MEMPROXY_CLASS(Entry); }; + NotePairs(){} ~NotePairs(); /** @@ -171,6 +172,10 @@ public: bool empty() const {return entries.empty();} Vector entries; ///< The key/value pair entries + +private: + NotePairs &operator = (NotePairs const &); // Not implemented + NotePairs(NotePairs const &); // Not implemented }; MEMPROXY_CLASS_INLINE(NotePairs::Entry); diff --git a/src/redirect.cc b/src/redirect.cc index cc86dcbf59..ec7cd58f60 100644 --- a/src/redirect.cc +++ b/src/redirect.cc @@ -116,8 +116,12 @@ redirectHandleReply(void *data, const HelperReply &reply) const Http::StatusCode status = static_cast(atoi(result)); HelperReply newReply; - newReply.result = reply.result; - newReply.notes = reply.notes; + // BACKWARD COMPATIBILITY 2012-06-15: + // We got HelperReply::Unknown reply result but new + // redirectStateData handlers require HelperReply::Okay, + // else will drop the helper reply + newReply.result = HelperReply::Okay; + newReply.notes.append(&reply.notes); if (status == Http::scMovedPermanently || status == Http::scMovedTemporarily