privoxy.git
14 years agoIf we think we already got a complete request, don't try to read from the client...
Fabian Keil [Sun, 28 Jun 2009 14:31:43 +0000 (14:31 +0000)]
If we think we already got a complete request, don't try to read from the client until we're ready again.

If we notice that we got more than a single request, mark
the server socket tainted and only serve the first request.

14 years agoRemove '.mandrakelinux.com/en/ftp.php3' from the -hide-referer section.
Fabian Keil [Sun, 28 Jun 2009 12:41:29 +0000 (12:41 +0000)]
Remove '.mandrakelinux.com/en/ftp.php3' from the -hide-referer section.
Reported by Frédéric Crozat in #2806624.

14 years agoOr not.
Fabian Keil [Sat, 27 Jun 2009 15:28:47 +0000 (15:28 +0000)]
Or not.

14 years agoHighlight:
Fabian Keil [Sat, 27 Jun 2009 15:10:16 +0000 (15:10 +0000)]
Highlight:
Appended client IP address to X-Forwarded-For: 10.0.0.2, 10.0.0.1

14 years agoIgnore messages with "Unknown log level".
Fabian Keil [Sat, 27 Jun 2009 15:09:33 +0000 (15:09 +0000)]
Ignore messages with "Unknown log level".

14 years agoDon't set CSP_FLAG_CLIENT_CONNECTION_KEEP_ALIVE in case of HTTP/1.0 requests.
Fabian Keil [Sat, 27 Jun 2009 11:25:33 +0000 (11:25 +0000)]
Don't set CSP_FLAG_CLIENT_CONNECTION_KEEP_ALIVE in case of HTTP/1.0 requests.

Otherwise the client might hang after receiving
all the data until the connection times out.

14 years agoDisable fast-redirects for '.redbot.org/'.
Fabian Keil [Sat, 27 Jun 2009 11:23:51 +0000 (11:23 +0000)]
Disable fast-redirects for '.redbot.org/'.

14 years agoRemove a useless 'because' in a log message.
Fabian Keil [Sat, 27 Jun 2009 11:22:52 +0000 (11:22 +0000)]
Remove a useless 'because' in a log message.

14 years agoAdd '/.*omniture.*\.js' to the list of blocked user-tracking scripts.
Fabian Keil [Sun, 21 Jun 2009 18:20:08 +0000 (18:20 +0000)]
Add '/.*omniture.*\.js' to the list of blocked user-tracking scripts.

Reported by Dominique Schramm in #2808098.

14 years agoMore truth in advertisements. Some features aren't available on all platforms.
Fabian Keil [Sun, 21 Jun 2009 18:17:04 +0000 (18:17 +0000)]
More truth in advertisements. Some features aren't available on all platforms.

Also remove multi-threading, improved signal handling and the
"true daemon mode" from the list. The user is unlikely to get
excited about them.

14 years agoTranslate * more precisely.
Fabian Keil [Sun, 21 Jun 2009 18:15:24 +0000 (18:15 +0000)]
Translate * more precisely.

14 years ago73) Factor FEATURE_CONNECTION_SHARING out of FEATURE_CONNECTION_KEEP_ALIVE ...
Fabian Keil [Sun, 21 Jun 2009 12:02:30 +0000 (12:02 +0000)]
73) Factor FEATURE_CONNECTION_SHARING out of FEATURE_CONNECTION_KEEP_ALIVE ...

14 years agoAlso use $PATH when searching for groups and id.
Fabian Keil [Sat, 20 Jun 2009 19:07:45 +0000 (19:07 +0000)]
Also use $PATH when searching for groups and id.
Should fix #2809547.

14 years agoDeclare sockaddr_storage_to_ip() and match_sockaddr() static.
Fabian Keil [Fri, 19 Jun 2009 15:50:53 +0000 (15:50 +0000)]
Declare sockaddr_storage_to_ip() and match_sockaddr() static.

14 years agoFix parameter description for pcrs_compile_dynamic_command().
Fabian Keil [Fri, 19 Jun 2009 15:34:32 +0000 (15:34 +0000)]
Fix parameter description for pcrs_compile_dynamic_command().

14 years agoAdd a few more +hide-if-modified-since{-60} tests.
Fabian Keil [Fri, 19 Jun 2009 13:26:18 +0000 (13:26 +0000)]
Add a few more +hide-if-modified-since{-60} tests.

14 years agoAdd: 72) Use less ugly Privoxy (fav)icons.
Fabian Keil [Fri, 19 Jun 2009 13:25:38 +0000 (13:25 +0000)]
Add: 72) Use less ugly Privoxy (fav)icons.

14 years agoAdd: 71) Allow to listen on multiple addresses without having to bind to all.
Fabian Keil [Fri, 19 Jun 2009 13:24:14 +0000 (13:24 +0000)]
Add: 71) Allow to listen on multiple addresses without having to bind to all.

14 years agoDisable the +hide-if-modified-since{-60} test with 'If-Modified-Since: Thu, 1 Jan...
Fabian Keil [Thu, 18 Jun 2009 17:14:16 +0000 (17:14 +0000)]
Disable the +hide-if-modified-since{-60} test with 'If-Modified-Since: Thu, 1 Jan 1970 00:00:00 GMT' if FEATURE_PTHREAD isn't available.
It's known not to work on mingw32.

14 years agoIf strftime() fails, drop the header without replacement like we already do in case...
Fabian Keil [Thu, 18 Jun 2009 17:10:16 +0000 (17:10 +0000)]
If strftime() fails, drop the header without replacement like we already do in case of other problems.

14 years agoDon't trust gmtime() to return usable structures for dates in the past.
Fabian Keil [Wed, 17 Jun 2009 18:23:06 +0000 (18:23 +0000)]
Don't trust gmtime() to return usable structures for dates in the past.

Intended to fix the crashes anonymously reported in #2807350 and #2797798.

14 years agoIn the strftime() failure messages, put the offending header in single-quotes.
Fabian Keil [Wed, 17 Jun 2009 14:51:51 +0000 (14:51 +0000)]
In the strftime() failure messages, put the offending header in single-quotes.

14 years agoCheck for strftime() failures in server_last_modified(), too.
Fabian Keil [Wed, 17 Jun 2009 14:51:23 +0000 (14:51 +0000)]
Check for strftime() failures in server_last_modified(), too.

14 years agoFix the log message from the last commit.
Fabian Keil [Wed, 17 Jun 2009 14:50:55 +0000 (14:50 +0000)]
Fix the log message from the last commit.

14 years agoIn case of strftime() failures in client_if_modified_since(), keep the original heade...
Fabian Keil [Tue, 16 Jun 2009 15:42:28 +0000 (15:42 +0000)]
In case of strftime() failures in client_if_modified_since(), keep the original header around.

Lee's Privoxy-Regression-Test result seems to indicate that it may
fail on Windows if the generated date predates the Unix epoch.

14 years agoDon't request 'Connection: keep-alive' from the server if keep-alive-timeout is 0.
Fabian Keil [Mon, 15 Jun 2009 20:50:56 +0000 (20:50 +0000)]
Don't request 'Connection: keep-alive' from the server if keep-alive-timeout is 0.
We're not going to reuse the connection anyway.

14 years agoLet level 13 also depend on 'config line keep-alive-timeout\s+[1-9]+'.
Fabian Keil [Mon, 15 Jun 2009 20:49:09 +0000 (20:49 +0000)]
Let level 13 also depend on 'config line keep-alive-timeout\s+[1-9]+'.
Noticed by Lee.

14 years agoLet dependency_unsatisfied() properly deal with tests that depend on both config...
Fabian Keil [Mon, 15 Jun 2009 20:47:49 +0000 (20:47 +0000)]
Let dependency_unsatisfied() properly deal with tests that depend on both config lines and features.

14 years agoRemove duplicated single-quotes.
Fabian Keil [Mon, 15 Jun 2009 17:12:45 +0000 (17:12 +0000)]
Remove duplicated single-quotes.

14 years agoPatch #2806626 from Frédéric Crozat to fix a closing tag.
Fabian Keil [Mon, 15 Jun 2009 15:08:03 +0000 (15:08 +0000)]
Patch #2806626 from Frédéric Crozat to fix a closing tag.

14 years agoIn get_log_level_string(), don't hide the LOG_LEVEL_REDIRECTS
Fabian Keil [Sun, 14 Jun 2009 15:59:56 +0000 (15:59 +0000)]
In get_log_level_string(), don't hide the LOG_LEVEL_REDIRECTS
translation behind ifdef FEATURE_FAST_REDIRECTS. It's used for
redirect{} as well.

14 years agoIn case of connection timeouts or missing server data, use a Last-Modified date in...
Fabian Keil [Sun, 14 Jun 2009 14:37:08 +0000 (14:37 +0000)]
In case of connection timeouts or missing server data, use a Last-Modified date in the past as well.

14 years agoBump version to 3.0.14 UNRELEASED.
Fabian Keil [Sun, 14 Jun 2009 14:36:13 +0000 (14:36 +0000)]
Bump version to 3.0.14 UNRELEASED.

14 years agoRemove CVS $Log entries.
Fabian Keil [Sun, 14 Jun 2009 14:35:42 +0000 (14:35 +0000)]
Remove CVS $Log entries.

14 years agoFix a tokenize() regression that caused it to miss tokens with trailing comments.
Fabian Keil [Sun, 14 Jun 2009 14:33:01 +0000 (14:33 +0000)]
Fix a tokenize() regression that caused it to miss tokens with trailing comments.

This it turn caused Privoxy-Regression-Test to always execute a test
that should only be executed if enable-edit-actions is enabled.

Looks like we need a Privoxy-Regression-Test-Regression-Test.

14 years agoRebuild for 3.0.13
hal9 [Sat, 13 Jun 2009 13:56:22 +0000 (13:56 +0000)]
Rebuild for 3.0.13

14 years agoRebuild for 3.0.13 beta.
Fabian Keil [Sat, 13 Jun 2009 13:10:49 +0000 (13:10 +0000)]
Rebuild for 3.0.13 beta.

14 years agoUpdate for 3.0.13 beta.
Fabian Keil [Sat, 13 Jun 2009 12:40:44 +0000 (12:40 +0000)]
Update for 3.0.13 beta.

14 years agoUpdate for 3.0.13 beta.
Fabian Keil [Sat, 13 Jun 2009 12:32:17 +0000 (12:32 +0000)]
Update for 3.0.13 beta.

14 years agoconnect_to() doesn't return void, so the recently added malloc check shouldn't either.
Fabian Keil [Sat, 13 Jun 2009 11:37:07 +0000 (11:37 +0000)]
connect_to() doesn't return void, so the recently added malloc check shouldn't either.

14 years agoA bunch of malloc() return code checks for the HAVE_RFC2553 code.
Fabian Keil [Sat, 13 Jun 2009 11:32:52 +0000 (11:32 +0000)]
A bunch of malloc() return code checks for the HAVE_RFC2553 code.

14 years agoManually merge latest updates.
Fabian Keil [Fri, 12 Jun 2009 14:43:50 +0000 (14:43 +0000)]
Manually merge latest updates.

14 years agoRebuilt with recent changes.
Fabian Keil [Fri, 12 Jun 2009 14:34:10 +0000 (14:34 +0000)]
Rebuilt with recent changes.

14 years agoRebuilt for 3.0.13 beta.
Fabian Keil [Fri, 12 Jun 2009 14:33:34 +0000 (14:33 +0000)]
Rebuilt for 3.0.13 beta.

14 years agoUpdate entities for 3.0.13 beta.
Fabian Keil [Fri, 12 Jun 2009 14:30:59 +0000 (14:30 +0000)]
Update entities for 3.0.13 beta.

14 years agoTell crunch_reason() about RSP_REASON_NO_SERVER_DATA.
Fabian Keil [Fri, 12 Jun 2009 13:39:02 +0000 (13:39 +0000)]
Tell crunch_reason() about RSP_REASON_NO_SERVER_DATA.

14 years agoMention that sharing connections increases the changes of connection problems.
Fabian Keil [Fri, 12 Jun 2009 11:53:33 +0000 (11:53 +0000)]
Mention that sharing connections increases the changes of connection problems.

14 years agoMention the TODO list in the participate entry.
Fabian Keil [Fri, 12 Jun 2009 11:52:33 +0000 (11:52 +0000)]
Mention the TODO list in the participate entry.

14 years agoUpdate "Support and Service" section to contain links to the participate and donate...
Fabian Keil [Fri, 12 Jun 2009 11:51:58 +0000 (11:51 +0000)]
Update "Support and Service" section to contain links to the participate and donate FAQ entries.

14 years agoChange code status to beta.
Fabian Keil [Fri, 12 Jun 2009 11:04:47 +0000 (11:04 +0000)]
Change code status to beta.

14 years agoImport ChangeLog for 3.0.13 beta.
Fabian Keil [Fri, 12 Jun 2009 11:04:13 +0000 (11:04 +0000)]
Import ChangeLog for 3.0.13 beta.

14 years agoRemove a now-redundant err check.
Fabian Keil [Fri, 12 Jun 2009 11:03:03 +0000 (11:03 +0000)]
Remove a now-redundant err check.

14 years agoRemove useless comment.
Fabian Keil [Thu, 11 Jun 2009 18:29:13 +0000 (18:29 +0000)]
Remove useless comment.

14 years agoWhite-space fixes.
Fabian Keil [Thu, 11 Jun 2009 14:32:55 +0000 (14:32 +0000)]
White-space fixes.

14 years agoMention IPv6 support, update keep-alive description, remove "cookie management" section.
Fabian Keil [Thu, 11 Jun 2009 14:26:40 +0000 (14:26 +0000)]
Mention IPv6 support, update keep-alive description, remove "cookie management" section.

14 years agoProtect a keepalive flag inside FEATURE_CONNECTION_KEEP_ALIVE ifdef
David Schmidt [Thu, 11 Jun 2009 14:13:19 +0000 (14:13 +0000)]
Protect a keepalive flag inside FEATURE_CONNECTION_KEEP_ALIVE ifdef

14 years agoEnlist Petr Písar who contributed the IPv6 code,
Fabian Keil [Thu, 11 Jun 2009 14:07:15 +0000 (14:07 +0000)]
Enlist Petr Písar who contributed the IPv6 code,
spelling the name as good as I seem to be able to
without messing up the encoding.

14 years agoMove Jörg to the former team members section.
Fabian Keil [Thu, 11 Jun 2009 13:57:01 +0000 (13:57 +0000)]
Move Jörg to the former team members section.

14 years agoChange code status to beta.
Fabian Keil [Thu, 11 Jun 2009 12:19:20 +0000 (12:19 +0000)]
Change code status to beta.

14 years agoAdd recently added cgi templates.
Fabian Keil [Thu, 11 Jun 2009 12:16:02 +0000 (12:16 +0000)]
Add recently added cgi templates.

14 years agoBump version for 3.0.13 beta.
Fabian Keil [Thu, 11 Jun 2009 12:13:51 +0000 (12:13 +0000)]
Bump version for 3.0.13 beta.

14 years agoUpdate for 3.0.13 beta.
Fabian Keil [Thu, 11 Jun 2009 12:10:09 +0000 (12:10 +0000)]
Update for 3.0.13 beta.

14 years agoSend a template-based response in case of prematurely closed connections.
Fabian Keil [Thu, 11 Jun 2009 11:49:11 +0000 (11:49 +0000)]
Send a template-based response in case of prematurely closed connections.

14 years agoIn error_response(), factor the (rsp->status == NULL) checks out of the if blocks.
Fabian Keil [Thu, 11 Jun 2009 11:47:16 +0000 (11:47 +0000)]
In error_response(), factor the (rsp->status == NULL) checks out of the if blocks.

14 years agoSend a template-based response in case of server connection timeouts.
Fabian Keil [Thu, 11 Jun 2009 11:46:22 +0000 (11:46 +0000)]
Send a template-based response in case of server connection timeouts.

14 years agoRemove error_response()'s third parameter. None of the templates use it.
Fabian Keil [Thu, 11 Jun 2009 11:44:25 +0000 (11:44 +0000)]
Remove error_response()'s third parameter. None of the templates use it.

14 years agoOSX doesn't define AI_NUMERICSERV
David Schmidt [Wed, 10 Jun 2009 22:36:01 +0000 (22:36 +0000)]
OSX doesn't define AI_NUMERICSERV

14 years agoRemove check_for_curl() as using 'which' isn't portable.
Fabian Keil [Wed, 10 Jun 2009 16:38:08 +0000 (16:38 +0000)]
Remove check_for_curl() as using 'which' isn't portable.
If curl turns out to be missing, we now simply die a bit later.

14 years agoLet extended hostname patterns without trailing dots cover hostnames with trailing...
Fabian Keil [Wed, 10 Jun 2009 13:17:17 +0000 (13:17 +0000)]
Let extended hostname patterns without trailing dots cover hostnames with trailing dot as well.

The old-school pattern code already does that as a side effect
of treating dots as delimiters instead of real characters.

14 years agoAdd tests for trailing dots in hostnames.
Fabian Keil [Wed, 10 Jun 2009 13:15:35 +0000 (13:15 +0000)]
Add tests for trailing dots in hostnames.

14 years agoFactor create_content_length_header() out of server_adjust_content_length().
Fabian Keil [Wed, 10 Jun 2009 12:50:15 +0000 (12:50 +0000)]
Factor create_content_length_header() out of server_adjust_content_length().

14 years agoIgnore: Content modified with no Content-Length header set. Creating a fake one for...
Fabian Keil [Mon, 8 Jun 2009 17:22:52 +0000 (17:22 +0000)]
Ignore: Content modified with no Content-Length header set. Creating a fake one for adjustment later on.

14 years agoThe fflush() argument is a pointer. Don't use 0 instead of NULL.
Fabian Keil [Mon, 8 Jun 2009 16:50:35 +0000 (16:50 +0000)]
The fflush() argument is a pointer. Don't use 0 instead of NULL.

14 years agoDon't leak parts of the client headers if a timeout is triggered while reading the...
Fabian Keil [Mon, 8 Jun 2009 16:48:50 +0000 (16:48 +0000)]
Don't leak parts of the client headers if a timeout is triggered while reading the request.

14 years agoHere's a fresh idea, why don't we respect taboos unless we're asked not to?
Fabian Keil [Mon, 8 Jun 2009 16:48:09 +0000 (16:48 +0000)]
Here's a fresh idea, why don't we respect taboos unless we're asked not to?

14 years agoDon't force the client to wait for the connection to timeout if we
Fabian Keil [Mon, 8 Jun 2009 16:47:07 +0000 (16:47 +0000)]
Don't force the client to wait for the connection to timeout if we
modified the content, the client asked for keep-alive and there's
no Content-Length header present.

14 years agoLet subs work with the test hash directly, there's no need to use a local copy.
Fabian Keil [Fri, 5 Jun 2009 18:58:26 +0000 (18:58 +0000)]
Let subs work with the test hash directly, there's no need to use a local copy.

14 years agoDocument the 6 mysterious bytes we skip in decompress_iob().
Fabian Keil [Fri, 5 Jun 2009 16:55:16 +0000 (16:55 +0000)]
Document the 6 mysterious bytes we skip in decompress_iob().

14 years agoRemove stray empty line.
Fabian Keil [Fri, 5 Jun 2009 16:54:27 +0000 (16:54 +0000)]
Remove stray empty line.

14 years agoUse macros for the magic numbers in decompress_iob().
Fabian Keil [Fri, 5 Jun 2009 16:53:55 +0000 (16:53 +0000)]
Use macros for the magic numbers in decompress_iob().

14 years agoItem "33) Remove the CVS Log message junk from the C files" is done.
Fabian Keil [Wed, 3 Jun 2009 18:49:18 +0000 (18:49 +0000)]
Item "33) Remove the CVS Log message junk from the C files" is done.

14 years agoExplicitly mention that the config file can be edited with a text editor and name...
Fabian Keil [Wed, 3 Jun 2009 18:30:18 +0000 (18:30 +0000)]
Explicitly mention that the config file can be edited with a text editor and name a few examples.
As #2782881 reminds us, Windows users aren't generally used to changing configuration files that way.

14 years agoFactor path_matches() out of url_match().
Fabian Keil [Wed, 3 Jun 2009 16:44:41 +0000 (16:44 +0000)]
Factor path_matches() out of url_match().

14 years agoFactor host_matches() out of url_match().
Fabian Keil [Wed, 3 Jun 2009 16:44:15 +0000 (16:44 +0000)]
Factor host_matches() out of url_match().

14 years agoFactor port_matches() out of url_match().
Fabian Keil [Wed, 3 Jun 2009 16:43:50 +0000 (16:43 +0000)]
Factor port_matches() out of url_match().

14 years agoFix comment spelling.
Fabian Keil [Wed, 3 Jun 2009 16:43:16 +0000 (16:43 +0000)]
Fix comment spelling.

14 years agoStreamline struct http_request if FEATURE_EXTENDED_HOST_PATTERNS is enabled.
Fabian Keil [Wed, 3 Jun 2009 16:42:49 +0000 (16:42 +0000)]
Streamline struct http_request if FEATURE_EXTENDED_HOST_PATTERNS is enabled.

14 years agoIf all the data we got decompressed OK, but zlib wants more, filter what we got inste...
Fabian Keil [Mon, 1 Jun 2009 16:34:48 +0000 (16:34 +0000)]
If all the data we got decompressed OK, but zlib wants more, filter what we got instead of forwarding the unfiltered compressed content.

14 years agoIn decompress_iob(), remove the skip_bytes history lesson and remove an unnecessary...
Fabian Keil [Mon, 1 Jun 2009 15:33:33 +0000 (15:33 +0000)]
In decompress_iob(), remove the skip_bytes history lesson and remove an unnecessary and incorrect assert().

14 years agoStyle fix.
Fabian Keil [Mon, 1 Jun 2009 15:14:40 +0000 (15:14 +0000)]
Style fix.

14 years agoIn client_if_modified_since(), rename negative to negative_range.
Fabian Keil [Mon, 1 Jun 2009 14:18:49 +0000 (14:18 +0000)]
In client_if_modified_since(), rename negative to negative_range.

14 years agoIn server_last_modified(), rename negative to negative_delta.
Fabian Keil [Mon, 1 Jun 2009 14:18:04 +0000 (14:18 +0000)]
In server_last_modified(), rename negative to negative_delta.

14 years agoFactor get_skip_reason() out of execute_regression_tests().
Fabian Keil [Mon, 1 Jun 2009 13:22:56 +0000 (13:22 +0000)]
Factor get_skip_reason() out of execute_regression_tests().

14 years agoIn check_for_forbidden_characters(), don't allow line breaks.
Fabian Keil [Mon, 1 Jun 2009 13:16:36 +0000 (13:16 +0000)]
In check_for_forbidden_characters(), don't allow line breaks.
Specifying them is currently not possible and makes no sense anyway.

14 years agoIn load_regression_tests(), catch-last minute config file changes
Fabian Keil [Mon, 1 Jun 2009 10:49:07 +0000 (10:49 +0000)]
In load_regression_tests(), catch-last minute config file changes
by requesting the config file twice and discarding the result of
the first request.

14 years agoTwo additional hide-if-modified-since{} tests created while debugging #2797798.
Fabian Keil [Thu, 28 May 2009 21:38:13 +0000 (21:38 +0000)]
Two additional hide-if-modified-since{} tests created while debugging #2797798.

As it turns out they don't actually cause any problems,
but at least in theory they could be edge cases and are
thus test-worthy.

14 years agoUnbreak compilation for compilers that don't recognize lone defs.
Fabian Keil [Thu, 28 May 2009 21:13:34 +0000 (21:13 +0000)]
Unbreak compilation for compilers that don't recognize lone defs.
Reported by Lee.

14 years agoTurn server_proxy_connection_adder() into a nop if the client didn't request keep...
Fabian Keil [Thu, 28 May 2009 18:42:30 +0000 (18:42 +0000)]
Turn server_proxy_connection_adder() into a nop if the client didn't request keep-alive.

14 years agoImprove code clarity by factoring log_and_die() out of l().
Fabian Keil [Thu, 28 May 2009 17:26:04 +0000 (17:26 +0000)]
Improve code clarity by factoring log_and_die() out of l().

14 years agoCheck the right macro to decide if we can use privoxy_mutex_lock().
Fabian Keil [Thu, 28 May 2009 17:07:42 +0000 (17:07 +0000)]
Check the right macro to decide if we can use privoxy_mutex_lock().

Should fix the crash-while-randomizing-header-dates bug on mingw32
anonymously reported in #2797798. This is pretty much the same bug
that was already fixed in 3.0.7, but apparently I found a way to
reintroduce it in 3.0.11. Yeehaw.