X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=regression-tests.action;h=9f812637e2b13bb3674ab559a13f01f96c13eee5;hp=bafc8907aa1d7f5fed64309df23b9a956e54a2bc;hb=23445442f4bf0aa0bcf6e35df09daf8ef0d69d99;hpb=f02930f5dbc4fe015c3595081a2a6d0a6d1ba738 diff --git a/regression-tests.action b/regression-tests.action index bafc8907..9f812637 100644 --- a/regression-tests.action +++ b/regression-tests.action @@ -1,16 +1,15 @@ ############################################################################# -# $Id: regression-tests.action,v 1.47 2012/11/11 12:40:53 fabiankeil Exp $ -############################################################################# # # This is a configuration file for Privoxy-Regression-Test -# (included in the source tarball's tools directory). +# (included in the source tarball's tools directory and available at +# https://www.privoxy.org/gitweb/?p=privoxy.git;a=blob;f=tools/privoxy-regression-test.pl;hb=HEAD). # -# After referencing it in your Privoxy configuration both Privoxy and +# After referencing this file in your Privoxy configuration both Privoxy and # Privoxy-Regression-Test should be good to go. # ############################################################################# # -# Copyright (c) 2007-2012 Fabian Keil +# Copyright (c) 2007-2020 Fabian Keil # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -27,23 +26,29 @@ ############################################################################# {{settings}} -for-privoxy-version=3.0.20 +for-privoxy-version=3.0.29 # Some dependencies Privoxy-Regression-Test should know about: # # Level 9 needs = config line user-manual\s+(\.?\.?/|[A-Za-z]:) +# Level 12 needs = feature status FEATURE_CGI_EDIT_ACTIONS Yes # Level 12 needs = config line enable-edit-actions\s+1 # Level 13 needs = feature status FEATURE_CONNECTION_KEEP_ALIVE Yes -# Level 13 needs = config line keep-alive-timeout\s+[1-9]+ +# Level 13 needs = config line keep-alive-timeout\s+(2[1-9]+|[3-9]\d+|1\d{2,}) # Level 14 needs = feature status FEATURE_CONNECTION_KEEP_ALIVE No # Level 15 needs = config line connection-sharing\s+0 # Level 16 needs = feature status FEATURE_CONNECTION_KEEP_ALIVE Yes # Level 16 needs = config line connection-sharing\s+1 -# Level 17 needs = feature status FEATURE_PTHREAD Yes +# Level 17 needs = feature status FEATURE_64_BIT_TIME_T Yes # Level 18 needs = feature status FEATURE_GRACEFUL_TERMINATION No # Level 19 needs = feature status FEATURE_GRACEFUL_TERMINATION Yes -# Level 20 needs = feature status FEATURE_TOGGLE Yes -# Level 21 needs = feature status FEATURE_TOGGLE No +# Level 20 needs = config line enable-remote-toggle\s+1 +# Level 21 needs = config line enable-remote-toggle\s+0 +# Level 22 needs = config line enable-proxy-authentication-forwarding\s+0 +# Level 23 needs = config line enable-proxy-authentication-forwarding\s+1 +# Level 24 needs = feature status FEATURE_CLIENT_TAGS Yes +# Level 25 needs = feature status FEATURE_HTTPS_INSPECTION No +# Level 26 needs = feature status FEATURE_PCRE_HOST_PATTERNS Yes ####################################################### # Enable taggers to activate the tests on demand @@ -103,7 +108,10 @@ TAG:^hide-accept-language\{block\}$ # Set Header = Referer: http:// # Expect Header = REMOVAL # -# Set Header = Referer: https://p.p/ +# Set Header = Referer: https://www.privoxy.org/ +# Expect Header = REMOVAL +# +# Set Header = Referer: http://www.privoxy.org/ # Expect Header = REMOVAL TAG:^hide-referrer\{conditional-block\}$ @@ -123,7 +131,10 @@ TAG:^hide-referrer\{conditional-block\}$ # Set Header = Referer: http:// # Expect Header = Referer: http://p.p/ # -# Set Header = Referer: https://p.p/ +# Set Header = Referer: https://www.privoxy.org/ +# Expect Header = Referer: http://p.p/ +# +# Set Header = Referer: http://www.privoxy.org/ # Expect Header = Referer: http://p.p/ TAG:^hide-referrer\{conditional-forge\}$ @@ -207,6 +218,28 @@ TAG:^add-header\{X-Custom-Header: yes, please\}$ # Expect Header = Referer: http://config.privoxy.org/foo/baaz.html TAG:^client-header-filter\{hide-tor-exit-notation\}$ +####################################################### +# Test client-header-filter{no-brotli-accepted}. +####################################################### + +{+client-header-filter{no-brotli-accepted}} +# Set Header = Accept-Encoding: gzip, deflate, br +# Expect Header = Accept-Encoding: gzip, deflate +# +# Set Header = Accept-Encoding: gzip, br, deflate +# Expect Header = Accept-Encoding: gzip, deflate +# +# Set Header = Accept-Encoding: br, gzip, deflate +# Expect Header = Accept-Encoding: gzip, deflate +# +# Set Header = Accept-Encoding: br +# Expect Header = Accept-Encoding: +# +# Set Header = Accept-Encoding: gzip, deflate +# Expect Header = NO CHANGE +# +TAG:^client-header-filter\{no-brotli-accepted\}$ + ####################################################### # Test crunch-client-header{}. ####################################################### @@ -326,6 +359,7 @@ TAG:^hide-if-modified-since\{-60\}$ # Expect Header = SOME CHANGE # Set Header = If-Modified-Since: Wed, 31 Dec 1969 23:59:59 GMT # Expect Header = SOME CHANGE +# Level = 17 TAG:^hide-if-modified-since\{\+60\}$ {+hide-if-modified-since{60} -crunch-if-none-match} @@ -578,6 +612,11 @@ TAG:^Connection: close$ TAG:^connection-sharing disabled$ {} +# XXX: This test is expected to fail when using "https://p.p/" +# as CGI prefix with https inspection enabled but can't +# yet be automatically skipped. By design connections aren't +# shared when using "https://" so Privoxy does not remove the +# header. # Set Header = Connection: close # Expect Header = REMOVAL # Level = 16 @@ -596,6 +635,15 @@ TAG:^connection-sharing enabled$ TAG:^No Host header$ {} +# XXX: This test is expected to fail when using "https://p.p/" +# as CGI prefix with https inspection enabled but can't +# yet be automatically skipped. The reason for the test +# failure is that Privoxy-Regression-Test only modifies +# the Host header for the CONNECT request, not for the +# actual request that follows. Changing that would not +# fix the test though as a modified Host header in the +# actual request would result in Privoxy attempting to +# connect to it. # Set Header = Host: whatever.example.org # Expect Header = NO CHANGE TAG:^Host header other than the target host$ @@ -604,12 +652,30 @@ TAG:^Host header other than the target host$ # Set Header = Keep-Alive: 20 # Expect Header = NO CHANGE # Level = 13 -TAG:^Pass Keep-Alive header$ +# Set Header = Keep-Alive: timeout=20, max=3 +# Expect Header = NO CHANGE +# Level = 13 +# Set Header = Keep-Alive: blah=fasel, timeout=20, max=3 +# Expect Header = NO CHANGE +# Level = 13 +# Set Header = Keep-Alive: timeuot=20, max=3 +# Expect Header = REMOVAL +# Level = 13 +# Set Header = Keep-Alive: twenty seconds please +# Expect Header = REMOVAL +# Level = 13 +TAG:^Parse Keep-Alive header$ {} # Set Header = Keep-Alive: 20 # Expect Header = REMOVAL # Level = 14 +# Set Header = Keep-Alive: timeout=20, max=3 +# Expect Header = REMOVAL +# Level = 14 +# Set Header = Keep-Alive: blah=fasel, timeout=20, max=3 +# Expect Header = REMOVAL +# Level = 14 TAG:^Keep-Alive header removal$ {} @@ -638,13 +704,25 @@ TAG:^Proxy-Connection removal$ # Expect Header = NO CHANGE TAG:^Max-Forwards header without TRACE method$ +{} +# Set Header = Proxy-Authorization: blafaseldieda +# Expect Header = REMOVAL +# Level = 22 +TAG:^Proxy-Authorization header removal$ + +{} +# Set Header = Proxy-Authorization: blafaseldieda +# Expect Header = Proxy-Authorization: blafaseldieda +# Level = 23 +TAG:^Proxy-Authorization header forwarding$ + ################################################################ # # Fairly dumb tests for Privoxy CGI pages. # # These are mainly useful for checking for memory leaks # with Valgrind or whether or not the user manual is installed -# correctly and are unlikely to actually detect any +# correctly. # # Note that if "Expect Status Code" is missing, 200 is implied. # @@ -670,6 +748,7 @@ TAG:^Max-Forwards header without TRACE method$ # Fetch Test = http://config.privoxy.org/show-status?file=invalid # Fetch Test = http://config.privoxy.org/show-status?file=trust # Fetch Test = http://p.p/show-version +# Expect Status Code = 404 # Fetch Test = http://p.p/show-request # Fetch Test = http://p.p/show-url-info # Fetch Test = http://p.p/show-url-info?url=www.privoxy.org%2F @@ -685,37 +764,91 @@ TAG:^Max-Forwards header without TRACE method$ # Fetch Test = http://p.p/toggle # Level = 20 # Fetch Test = http://p.p/toggle -# Expect Status Code = 404 +# Expect Status Code = 403 # Level = 21 # Fetch Test = http://p.p/edit-actions +# Expect Status Code = 403 +# Level = 12 # Fetch Test = http://p.p/eaa +# Expect Status Code = 403 +# Level = 12 # Fetch Test = http://p.p/eau +# Expect Status Code = 403 +# Level = 12 # Fetch Test = http://p.p/ear +# Expect Status Code = 403 +# Level = 12 # Fetch Test = http://p.p/eal +# Expect Status Code = 403 +# Level = 12 # Fetch Test = http://p.p/eafu +# Expect Status Code = 403 +# Level = 12 # Fetch Test = http://p.p/eas +# Expect Status Code = 403 +# Level = 12 # Fetch Test = http://p.p/easa +# Expect Status Code = 403 +# Level = 12 # Fetch Test = http://p.p/easr +# Expect Status Code = 403 +# Level = 12 # Fetch Test = http://p.p/eass +# Expect Status Code = 403 +# Level = 12 # Fetch Test = http://p.p/edit-actions-for-url +# Expect Status Code = 403 +# Level = 12 # Fetch Test = http://p.p/edit-actions-list +# Level = 12 # Fetch Test = http://p.p/edit-actions-submit +# Expect Status Code = 403 +# Level = 12 +# Expect Status Code = 403 # Fetch Test = http://p.p/edit-actions-url +# Expect Status Code = 403 +# Level = 12 # Fetch Test = http://p.p/edit-actions-url-form +# Expect Status Code = 403 +# Level = 12 # Fetch Test = http://p.p/edit-actions-add-url +# Expect Status Code = 403 +# Level = 12 # Fetch Test = http://p.p/edit-actions-add-url-form +# Expect Status Code = 403 +# Level = 12 # Fetch Test = http://p.p/edit-actions-remove-url +# Expect Status Code = 403 +# Level = 12 # Fetch Test = http://p.p/edit-actions-remove-url-form +# Expect Status Code = 403 +# Level = 12 # Fetch Test = http://p.p/edit-actions-section-add +# Expect Status Code = 403 +# Level = 12 # Fetch Test = http://p.p/edit-actions-section-remove +# Expect Status Code = 403 +# Level = 12 # Fetch Test = http://p.p/edit-actions-section-swap +# Expect Status Code = 403 +# Level = 12 # Fetch Test = http://p.p/error-favicon.ico # Fetch Test = http://p.p/favicon.ico # Fetch Test = http://p.p/robots.txt # Fetch Test = http://p.p/send-banner +# Trusted CGI Request = http://p.p/send-stylesheet # Fetch Test = http://p.p/send-stylesheet +# Expect Status Code = 403 # Fetch Test = http://p.p/t # Fetch Test = http://p.p/url-info-osd.xml +# Fetch Test = http://p.p/client-tags +# Level = 24 +# Trusted CGI Request = http://p.p/toggle-client-tag +# Expect Status Code = 302 +# Level = 24 +# Fetch Test = http://p.p/toggle-client-tag +# Expect Status Code = 403 +# Level = 24 # Trusted CGI Request = http://p.p/edit-actions # Expect Status Code = 302 @@ -723,26 +856,47 @@ TAG:^Max-Forwards header without TRACE method$ # Fetch Test = http://p.p/does-not-exist # Expect Status Code = 404 # Trusted CGI Request = http://p.p/eaa +# Level = 12 # Trusted CGI Request = http://p.p/eau +# Level = 12 # Trusted CGI Request = http://p.p/ear +# Level = 12 # Trusted CGI Request = http://p.p/eal +# Level = 12 # Trusted CGI Request = http://p.p/eafu +# Level = 12 # Trusted CGI Request = http://p.p/eas +# Level = 12 # Trusted CGI Request = http://p.p/easa +# Level = 12 # Trusted CGI Request = http://p.p/easr +# Level = 12 # Trusted CGI Request = http://p.p/eass +# Level = 12 # Trusted CGI Request = http://p.p/edit-actions-for-url +# Level = 12 # Trusted CGI Request = http://p.p/edit-actions-list +# Level = 12 # Trusted CGI Request = http://p.p/edit-actions-submit +# Level = 12 # Trusted CGI Request = http://p.p/edit-actions-url +# Level = 12 # Trusted CGI Request = http://p.p/edit-actions-url-form +# Level = 12 # Trusted CGI Request = http://p.p/edit-actions-add-url +# Level = 12 # Trusted CGI Request = http://p.p/edit-actions-add-url-form +# Level = 12 # Trusted CGI Request = http://p.p/edit-actions-remove-url +# Level = 12 # Trusted CGI Request = http://p.p/edit-actions-remove-url-form +# Level = 12 # Trusted CGI Request = http://p.p/edit-actions-section-add +# Level = 12 # Trusted CGI Request = http://p.p/edit-actions-section-remove +# Level = 12 # Trusted CGI Request = http://p.p/edit-actions-section-swap +# Level = 12 # Trusted CGI Request = http://p.p/send-stylesheet # The following tests depend on Privoxy being configured to deliver the user manual @@ -803,6 +957,7 @@ TAG:^Max-Forwards header without TRACE method$ # Method Test = OPTIONS # Method Test = TRACE # Method Test = CONNECT +# Level = 25 # Method Test = PROPFIND # Method Test = PROPPATCH # Method Test = MOVE @@ -830,6 +985,7 @@ TAG:^Max-Forwards header without TRACE method$ # Method Test = MERGE # Method Test = BASELINE-CONTROL # Method Test = MKACTIVITY +# Method Test = PATCH # Method Test = PRIVOXY-REGRESSION-TEST-IN-THE-HOUSE # Expect Status Code = 400 @@ -974,3 +1130,15 @@ redirect.example.net/ # Redirected URL = http://redirect2.example.net/blafasel?x=http://redirected.example.net/¶meter1=part-of-the-redirected-url1¶meter2=part-of-the-redirected-url1 # Redirect Destination = http://redirected.example.net/¶meter1=part-of-the-redirected-url1¶meter2=part-of-the-redirected-url1 redirect2.example.net/ + +{+delay-response{1}} +# Fetch Test = http://config.privoxy.org/show-url-info?url=http%3A%2F%2Fwww.example.com%2Fprivoxy-test-delay-response +config.privoxy.org/show-url-info\?url=http%3A%2F%2Fwww\.example\.com%2Fprivoxy-test-delay-response + +{+block{Block with pcre host pattern}} +# Blocked URL = http://aaa.example.org/ +# Level = 26 +PCRE-HOST-PATTERN:^a{3}\.example\.org$ +# Blocked URL = http://bbb.example.org/ +# Level = 26 +PCRE-HOST-PATTERN:^(bbb|ccc|ddd)\.example\.org$