]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - config/urlfilter/redirect_wrapper
redirect wrapper: Adopt to new squid helper protocol.
[people/teissler/ipfire-2.x.git] / config / urlfilter / redirect_wrapper
index c3bbf7c9f45ff7549abed98768b729a9dfc24601..96cc0a094ba997dc387b5eadf4660e8b41286f38 100644 (file)
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2009  Michael Tremer & Christian Schmidt                      #
+# Copyright (C) 2007-2012  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -100,7 +100,7 @@ while($line = <>) {
                        }
 
                # break if redirector changes data
-               if($return ne "\n" and $return ne $line ){
+               if($return ne "ERR\n" and $return ne $line ){
                        if ( $redirectors->[$i] ne "/usr/sbin/updxlrator"){
                                if ($debug){
                                        writetolog($redirectors->[$i]." is stopping querry because block was found.");
@@ -115,7 +115,7 @@ while($line = <>) {
 exit 0;
 
 sub writetolog {
-       open(DATEI, ">>/var/log/squid/redirector_debug") || die "Unable to acces file /var/log/redirector_debug";
+       open(DATEI, ">>/var/log/squid/redirector_debug") || die "Unable to acces file /var/log/squid/redirector_debug";
        my $log = shift;
        print DATEI $log."\n";
        close(DATEI);