]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Do not log bogus ERRORs when url_rewrite_access bypasses url_rewriter.
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 6 Jun 2013 16:43:29 +0000 (10:43 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Thu, 6 Jun 2013 16:43:29 +0000 (10:43 -0600)
The code uses HelperReply() object as a fake reply when url_rewrite_access
ACLs did not match. That fake reply had Unknown result code, which made Squid
log ERRORs to cache.log. We now use Error result code, just like
store_id_access does.

TODO: Bypass the overheads of creating and processing a fake reply by moving
all post-processing actions and checks into a new dedicated method and calling
that method when url_rewrite_access does not match. Do the same to the StoreID
code.

src/client_side_request.cc

index d3070c9a56beaa61295bf261f463dd3691029267..0b9d5cfd30ea312a6a93126a3748bcd6fc58afd4 100644 (file)
@@ -906,6 +906,7 @@ clientRedirectAccessCheckDone(allow_t answer, void *data)
         redirectStart(http, clientRedirectDoneWrapper, context);
     else {
         HelperReply nilReply;
+        nilReply.result = HelperReply::Error;
         context->clientRedirectDone(nilReply);
     }
 }