From: Christos Tsantilas Date: Thu, 4 Oct 2012 11:53:31 +0000 (-0600) Subject: Bug 3658: ERR_ZERO_SIZE errors propagates out even after successful retry X-Git-Tag: SQUID_3_2_2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46148e715bdf17d8ba8749edf18618f6e72bf639;p=thirdparty%2Fsquid.git Bug 3658: ERR_ZERO_SIZE errors propagates out even after successful retry --- diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc index 72be7f9da4..8348f2ef19 100644 --- a/src/HttpRequest.cc +++ b/src/HttpRequest.cc @@ -207,6 +207,7 @@ HttpRequest::clone() const copy->hier = hier; // Is it safe to copy? Should we? copy->errType = errType; + copy->errDetail = errDetail; // XXX: what to do with copy->peer_login? @@ -528,6 +529,14 @@ HttpRequest::detailError(err_type aType, int aDetail) errDetail = aDetail; } +void +HttpRequest::clearError() +{ + debugs(11, 7, HERE << "old error details: " << errType << '/' << errDetail); + errType = ERR_NONE; + errDetail = ERR_DETAIL_NONE; +} + const char *HttpRequest::packableURI(bool full_uri) const { if (full_uri) diff --git a/src/HttpRequest.h b/src/HttpRequest.h index dc44fea712..737a7bc39a 100644 --- a/src/HttpRequest.h +++ b/src/HttpRequest.h @@ -121,6 +121,8 @@ public: /// sets error detail if no earlier detail was available void detailError(err_type aType, int aDetail); + /// clear error details, useful for retries/repeats + void clearError(); protected: void clean(); diff --git a/src/forward.cc b/src/forward.cc index 3504cacff3..8f15fd335a 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -345,6 +345,7 @@ FwdState::startConnectionOrFail() // this server link regardless of what happens when connecting to it. // IF sucessfuly connected this top destination will become the serverConnection(). request->hier.note(serverDestinations[0], request->GetHost()); + request->clearError(); connectStart(); } else {