From: Fabian Keil Date: Sun, 6 Nov 2011 11:50:15 +0000 (+0000) Subject: In get_last_url(), do not bother trying to decode URLs that do not contain at least... X-Git-Tag: v_3_0_18~37 X-Git-Url: http://www.privoxy.org/gitweb/whatsnew.html?a=commitdiff_plain;h=36acaceaae9b0e88caf892ffd2751e53108ebff5;p=privoxy.git In get_last_url(), do not bother trying to decode URLs that do not contain at least one '%' sign It reduces the log noise and a number of unnecessary memory allocations. --- diff --git a/filters.c b/filters.c index 4f4684e2..3c14ac8f 100644 --- a/filters.c +++ b/filters.c @@ -1,4 +1,4 @@ -const char filters_rcs[] = "$Id: filters.c,v 1.156 2011/11/06 11:45:28 fabiankeil Exp $"; +const char filters_rcs[] = "$Id: filters.c,v 1.157 2011/11/06 11:48:23 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/filters.c,v $ @@ -1105,7 +1105,7 @@ char *get_last_url(char *subject, const char *redirect_mode) return NULL; } - if (0 == strcmpic(redirect_mode, "check-decoded-url")) + if (0 == strcmpic(redirect_mode, "check-decoded-url") && strchr(subject, '%')) { log_error(LOG_LEVEL_REDIRECTS, "Checking \"%s\" for encoded redirects.", subject);