--- /dev/null
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK
+Connection: close
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 OK
+Connection: close
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</proxy-reply>
+
+<client>
+<server>
+http
+</server>
+<name>
+Simple "Connection: close" header
+</name>
+<command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+</verify>
+</testcase>
--- /dev/null
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK
+Connection: keep-alive
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 OK
+Connection: keep-alive
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</proxy-reply>
+
+<client>
+<server>
+http
+</server>
+<name>
+Empty "Connection:" header with "keep-alive" keyword and lots of whitespace
+</name>
+<command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+</verify>
+</testcase>
--- /dev/null
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK
+Connection: keep-alive
+Connection: close
+Connection: close
+Connection: keep-alive
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 OK
+Connection: keep-alive
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</proxy-reply>
+
+<client>
+<server>
+http
+</server>
+<name>
+Multiple conflicting "Connection:" headers.
+</name>
+<command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+</verify>
+</testcase>
--- /dev/null
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK
+Connection: close
+Connection: keep-alive
+Connection: close
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 OK
+Connection: close
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</proxy-reply>
+
+<client>
+<server>
+http
+</server>
+<name>
+Multiple conflicting "Connection:" headers.
+</name>
+<command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+</verify>
+</testcase>
--- /dev/null
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK
+Connection: keep-alive
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 OK
+Connection: keep-alive
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</proxy-reply>
+
+<client>
+<server>
+http
+</server>
+<name>
+Simple "Connection: keep-alive" header
+</name>
+<command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+</verify>
+</testcase>
--- /dev/null
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK
+Connection: keep-alive, Upgrade
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 OK
+Connection: keep-alive
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</proxy-reply>
+
+<client>
+<server>
+http
+</server>
+<name>
+"Connection:" header with unsupported "upgrade" keyword
+</name>
+<command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+</verify>
+</testcase>
--- /dev/null
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK
+Connection: keep-alive, blafasel, tralala, yolo, test, hoho
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 OK
+Connection: close
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</proxy-reply>
+
+<client>
+<server>
+http
+</server>
+<name>
+"Connection:" header with "too many" keywords
+</name>
+<command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+</verify>
+</testcase>
--- /dev/null
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK
+Connection: keep-alive, test1, test2, test3
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 OK
+Connection: keep-alive
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</proxy-reply>
+
+<client>
+<server>
+http
+</server>
+<name>
+"Connection:" header with some unsupported keywords
+</name>
+<command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+</verify>
+</testcase>
--- /dev/null
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK
+Connection: test1, test2, test3, keep-alive
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 OK
+Connection: keep-alive
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</proxy-reply>
+
+<client>
+<server>
+http
+</server>
+<name>
+"Connection:" header with some unsupported keywords, keep-alive keyword at the end
+</name>
+<command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+</verify>
+</testcase>
--- /dev/null
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK
+Connection: KeEp-aLiVe
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 OK
+Connection: KeEp-aLiVe
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</proxy-reply>
+
+<client>
+<server>
+http
+</server>
+<name>
+"Connection:" header with "KeEp-aLiVe" keyword
+</name>
+<command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+</verify>
+</testcase>
--- /dev/null
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK
+Connection: ,
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 OK
+Connection: close
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</proxy-reply>
+
+<client>
+<server>
+http
+</server>
+<name>
+"Connection:" header with single comma instead of actual keywords
+</name>
+<command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+</verify>
+</testcase>
--- /dev/null
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK
+Connection:
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</reply>
+
+<proxy-reply>
+<data>
+HTTP/1.1 200 OK
+Connection: close
+Content-Type: text/plain
+Content-Length: 10
+
+Blafasel.
+</data>
+</proxy-reply>
+
+<client>
+<server>
+http
+</server>
+<name>
+Empty "Connection:" header
+</name>
+<command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+</command>
+</client>
+
+<verify>
+</verify>
+</testcase>
--- /dev/null
+listen-address 127.0.0.1:9119
+
+debug 1 # Log the destination for each request Privoxy let through. See also debug 1024.
+debug 2 # show each connection status
+debug 4 # show tagging-related messages
+debug 8 # show header parsing
+debug 32 # debug force feature
+debug 64 # debug regular expression filters
+debug 128 # debug redirects
+debug 256 # debug GIF de-animation
+debug 512 # Common Log Format
+debug 1024 # Log the destination for requests Privoxy didn't let through, and the reason why.
+debug 4096 # Startup banner and warnings.
+debug 8192 # Non-fatal errors
+
+keep-alive-timeout 1