Add a range-requests tagger.
authorFabian Keil <fk@fabiankeil.de>
Fri, 3 Sep 2010 17:40:07 +0000 (17:40 +0000)
committerFabian Keil <fk@fabiankeil.de>
Fri, 3 Sep 2010 17:40:07 +0000 (17:40 +0000)
default.filter

index b5ca574..8a22c3c 100644 (file)
@@ -2,7 +2,7 @@
 # 
 #  File        :  $Source: /cvsroot/ijbswa/current/default.filter,v $
 # 
-#  $Id: default.filter,v 1.77 2010/02/05 21:41:31 fabiankeil Exp $
+#  $Id: default.filter,v 1.78 2010/04/18 11:20:48 fabiankeil Exp $
 #
 #  Purpose     :  Rules to process the content of web pages
 # 
@@ -764,6 +764,34 @@ CLIENT-HEADER-TAGGER: css-requests Tags detected CSS requests as "CSS-REQUEST".
 
 s@^Accept:\s*text/css.*@CSS-REQUEST@i
 
+#################################################################################
+#
+# range-requests: Tags range requests as "RANGE-REQUEST".
+#
+#                 By default Privoxy removes Range headers for requests to
+#                 ressources that will be filtered to make sure the filters
+#                 get the whole picture. Otherwise Range requests could be
+#                 intentionally used to circumvent filters or, less likely,
+#                 filtering a partial response may damage it because it matched
+#                 a pattern that the ressource as a whole wouldn't.
+#
+#                 Range requests can be useful and save bandwidth so instead
+#                 of removing Range headers for requests to ressources that
+#                 will be filtered, you may prefer to simply disable filtering
+#                 for those requests.
+#
+#                 That's what this tagger is all about. After enabling it,
+#                 you can disable filtering for range requests using the following
+#                 action section:
+#
+#                 {-filter -deanimate-gifs}
+#                 TAG:^RANGE-REQUEST
+#
+#################################################################################
+CLIENT-HEADER-TAGGER: range-requests Tags range requests as "RANGE-REQUEST".
+
+s@^Range:.*@RANGE-REQUEST@i
+
 #################################################################################
 #
 # client-ip-address: Tags the request with the client's IP address.