Fabian Keil [Fri, 7 Dec 2012 12:43:05 +0000 (12:43 +0000)]
Make any_loaded_file_changed() more reliable
Using the timestamps from csp->config->config_file_list
doesn't always work as they are only updated when the
config file is changed.
If an action or filter file is reloaded the timestamps
aren't updated so any_loaded_file_changed() continued
to report file changes.
Fabian Keil [Thu, 29 Nov 2012 09:57:39 +0000 (09:57 +0000)]
Use strdup_or_die() instead of strdup()
The strings are known to be short.
Fabian Keil [Thu, 29 Nov 2012 09:53:28 +0000 (09:53 +0000)]
Remove remnant of FEATURE_COOKIE_JAR
Fabian Keil [Sat, 24 Nov 2012 14:14:37 +0000 (14:14 +0000)]
Add #108: Allow to use a somewhat random string intead of PRIVOXY-FORCE
According to #
2963658 this was already on "the TODO list",
but apparently not on this one.
Fabian Keil [Sat, 24 Nov 2012 14:13:58 +0000 (14:13 +0000)]
Add #107: Support more pcrs variables
Fabian Keil [Sat, 24 Nov 2012 14:12:32 +0000 (14:12 +0000)]
Add Rick Sykes
He suggested something like the +limit-cookie-lifetime{} action in #
1049575.
Fabian Keil [Sat, 24 Nov 2012 14:11:09 +0000 (14:11 +0000)]
Fix sorting
Fabian Keil [Sat, 24 Nov 2012 14:09:11 +0000 (14:09 +0000)]
Set the SERVER_CONTENT_LENGTH_SET flag after creating a new Content-Length header
This allows to keep the client connection alive after
filtering a chunk-encoded response.
Fabian Keil [Sat, 24 Nov 2012 14:07:57 +0000 (14:07 +0000)]
Let server_set_cookie() stay silent when the cookie isn't modified
It previously would claim to have created a session cookie
after letting a session cookie pass unmodified.
Fabian Keil [Sat, 24 Nov 2012 14:06:18 +0000 (14:06 +0000)]
Allow HTTP/1.0 clients to signal interest in keep-alive through the Proxy-Connection header
While such client are rare in the real world, it doesn't
hurt and couple of curl tests rely on it.
Fabian Keil [Sat, 24 Nov 2012 14:04:29 +0000 (14:04 +0000)]
Stop considering client sockets tainted after receving a request with body
It hasn't been necessary for a while now and unnecessarily
causes test failures when using curl's test suite.
Fabian Keil [Sat, 24 Nov 2012 14:01:25 +0000 (14:01 +0000)]
Fix a harmless logic bug in mark_server_socket_tainted()
The log message was never printed while the intention was
to only suppress it if the socket was tainted already.
Copy&paste man struck again.
Fabian Keil [Sat, 24 Nov 2012 14:00:25 +0000 (14:00 +0000)]
Allow serve() to keep client connections open if the response content length is zero
Fabian Keil [Sat, 24 Nov 2012 13:59:00 +0000 (13:59 +0000)]
Allow closing curly braces as part of action values as long as they are escaped
Fabian Keil [Sat, 24 Nov 2012 13:58:17 +0000 (13:58 +0000)]
Move string_move() into miscutil.c and make it extern
It's not really a parser.
Fabian Keil [Sat, 24 Nov 2012 13:57:30 +0000 (13:57 +0000)]
Reduce indirection in parse_header_time()
Fabian Keil [Sat, 24 Nov 2012 13:55:51 +0000 (13:55 +0000)]
Increase MAX_AF_FILES to 30
An unused file slot is pretty inexpensive.
Fabian Keil [Sun, 11 Nov 2012 12:42:00 +0000 (12:42 +0000)]
Consistently put the tests between the tested actions and the TAG or URL pattern
It makes it more obvious which test belongs to which action section
and we already use this style in default.action.master.
Fabian Keil [Sun, 11 Nov 2012 12:41:12 +0000 (12:41 +0000)]
Remove a TODO comment about expiring cookies before the end of the session
Fabian Keil [Sun, 11 Nov 2012 12:40:53 +0000 (12:40 +0000)]
Disable limit-cookie-lifetime{} in two tests
Fabian Keil [Sun, 11 Nov 2012 12:39:56 +0000 (12:39 +0000)]
Add limit-cookie-lifetime{} support for the CGI editor
Fabian Keil [Sun, 11 Nov 2012 12:39:41 +0000 (12:39 +0000)]
Bump copyright
Fabian Keil [Sun, 11 Nov 2012 12:39:15 +0000 (12:39 +0000)]
Document limit-cookie-lifetime{}
Fabian Keil [Sun, 11 Nov 2012 12:38:42 +0000 (12:38 +0000)]
Add limit-cookie-lifetime{} action
It can be used to let cookies expire before the end of the session.
limit-cookie-lifetime{0} creates session cookies and can thus
replace the session-cookies-only action in the future.
Fabian Keil [Sun, 11 Nov 2012 12:37:42 +0000 (12:37 +0000)]
Only call time() in server_set_cookie() if the time is actually needed
Fabian Keil [Sun, 11 Nov 2012 12:37:10 +0000 (12:37 +0000)]
Fix a function description
Fabian Keil [Sun, 11 Nov 2012 12:36:45 +0000 (12:36 +0000)]
When parsing action files, use strdup_or_die() instead of strdup()
It simplifies the code, the input is trusted and errors
are already fatal anyway.
Fabian Keil [Sun, 11 Nov 2012 12:30:18 +0000 (12:30 +0000)]
Fix grammar
Fabian Keil [Fri, 9 Nov 2012 10:53:39 +0000 (10:53 +0000)]
Style fix for the previous commit
Fabian Keil [Fri, 9 Nov 2012 10:50:30 +0000 (10:50 +0000)]
Rebuild after documenting --config-test
Fabian Keil [Fri, 9 Nov 2012 10:49:59 +0000 (10:49 +0000)]
Document --config-test option
Fabian Keil [Fri, 9 Nov 2012 10:49:14 +0000 (10:49 +0000)]
Regenerate man page
Fabian Keil [Fri, 9 Nov 2012 10:48:56 +0000 (10:48 +0000)]
Sort options alphabetically
Fabian Keil [Fri, 9 Nov 2012 10:48:40 +0000 (10:48 +0000)]
Document the --config-test option
Fabian Keil [Fri, 9 Nov 2012 10:48:17 +0000 (10:48 +0000)]
Add a --config-test option
It lets Privoxy exit after checking whether or not the
configuration seems valid. The limitations noted in
TODO #22 and #23 still apply.
Logging the problem to the logfile if one is configured
and --no-daemon isn't used could be considered non-intuitive
and might also clobber messages emitted by an already running
instance.
Based on a patch by Ramkumar Chinchani.
Fabian Keil [Fri, 9 Nov 2012 10:47:42 +0000 (10:47 +0000)]
Let finish_http_response() advertise that the Content-Length header has been set
This allows jcc.c v1.412's serve() to keep the client connection open.
Fabian Keil [Fri, 9 Nov 2012 10:47:06 +0000 (10:47 +0000)]
Remove an obsolete master remark
Fabian Keil [Fri, 9 Nov 2012 10:46:50 +0000 (10:46 +0000)]
Disable fast-redirects for .googleapis.com/
Fabian Keil [Fri, 9 Nov 2012 10:46:06 +0000 (10:46 +0000)]
Remove an obsolete debug message in decompress_iob()
Fabian Keil [Fri, 9 Nov 2012 10:45:41 +0000 (10:45 +0000)]
Add a couple of hide-if-modified-since{} tests with different date formats
Fabian Keil [Fri, 9 Nov 2012 10:45:15 +0000 (10:45 +0000)]
Block /openx/www/delivery/
Fabian Keil [Mon, 29 Oct 2012 12:04:42 +0000 (12:04 +0000)]
Do not keep the client connection open if it has to be closed to mark the end of the response
Fabian Keil [Mon, 29 Oct 2012 12:02:55 +0000 (12:02 +0000)]
Clarify that the destination-change detection works for intercepted requests as well
For some values of "clarify".
Fabian Keil [Mon, 29 Oct 2012 12:01:31 +0000 (12:01 +0000)]
Fix an assertion in pcrs_compile_replacement(), nul bytes are actually fine
Fabian Keil [Mon, 29 Oct 2012 12:00:50 +0000 (12:00 +0000)]
In verify_request_length(), express 'unread client data available' in a more reasonable way
Fabian Keil [Mon, 29 Oct 2012 12:00:15 +0000 (12:00 +0000)]
Fix an assertion in verify_request_length()
Fabian Keil [Mon, 29 Oct 2012 11:59:34 +0000 (11:59 +0000)]
Update verify_request_length()'s description
Fabian Keil [Mon, 29 Oct 2012 11:59:08 +0000 (11:59 +0000)]
Accept and highlight: Tainting client socket 7 due to unread data.
Fabian Keil [Sat, 27 Oct 2012 11:02:04 +0000 (11:02 +0000)]
Unblock websupport.wdc.com/
Reported by Adam Piggot in #
3577851.
Fabian Keil [Tue, 23 Oct 2012 10:22:20 +0000 (10:22 +0000)]
Make a log message in serve() more consistent with the rest
Fabian Keil [Tue, 23 Oct 2012 10:20:14 +0000 (10:20 +0000)]
Unbreak compilation without FEATURE_CONNECTION_KEEP_ALIVE
Fabian Keil [Tue, 23 Oct 2012 10:19:04 +0000 (10:19 +0000)]
Make a couple of csp members visible when compiling without FEATURE_CONNECTION_KEEP_ALIVE
They are unconditionally used in a couple of log messages
and ifdef protecting them would be a mess.
Fabian Keil [Tue, 23 Oct 2012 10:18:19 +0000 (10:18 +0000)]
Hide get_expected_content_length() when compiling without FEATURE_CONNECTION_KEEP_ALIVE
It's not called and references functions that aren't available
in that scenario.
Fabian Keil [Tue, 23 Oct 2012 10:17:36 +0000 (10:17 +0000)]
Make socket_is_still_alive() visible when compiling without FEATURE_CONNECTION_KEEP_ALIVE
Nowadays it's used for general timeout detection as well.
Fabian Keil [Tue, 23 Oct 2012 10:16:52 +0000 (10:16 +0000)]
Make mark_connection_closed() visible when compiling without FEATURE_CONNECTION_KEEP_ALIVE
It's used all over the place, ifdef-protecting each
occurrence would be a mess, and calling it doesn't hurt.
Fabian Keil [Sun, 21 Oct 2012 14:40:44 +0000 (14:40 +0000)]
In serve(), stop considering connection sharing a reason to keep the client socket open
This should have been committed with 1.396.
Fabian Keil [Sun, 21 Oct 2012 13:42:46 +0000 (13:42 +0000)]
Add a digit missed in the previous commit
Fabian Keil [Sun, 21 Oct 2012 13:06:20 +0000 (13:06 +0000)]
Accept and highlight: Drained 180 bytes before closing socket 6
Fabian Keil [Sun, 21 Oct 2012 13:05:51 +0000 (13:05 +0000)]
Accept and highlight the extended log message for client sockets
Fabian Keil [Sun, 21 Oct 2012 13:05:09 +0000 (13:05 +0000)]
Bump generated Firefox version to 16
Fabian Keil [Sun, 21 Oct 2012 13:04:34 +0000 (13:04 +0000)]
Remember connections in case of destination mismatches in chat()
... when configured to share connection.
Fabian Keil [Sun, 21 Oct 2012 13:04:08 +0000 (13:04 +0000)]
Rephrase log messages in serve()
Fabian Keil [Sun, 21 Oct 2012 13:03:09 +0000 (13:03 +0000)]
Rebuild documentation for the new config directives in 3.0.20
Fabian Keil [Sun, 21 Oct 2012 13:02:01 +0000 (13:02 +0000)]
Document the tolerate-pipelining directive
Fabian Keil [Sun, 21 Oct 2012 13:01:40 +0000 (13:01 +0000)]
In the keep-alive section, acknowledge that there are other reasons why clients may hang
Fabian Keil [Sun, 21 Oct 2012 13:00:56 +0000 (13:00 +0000)]
Accept and highlight: Client request 4 arrived in time on socket 7.
Fabian Keil [Sun, 21 Oct 2012 13:00:36 +0000 (13:00 +0000)]
Accept and highlight: Closing client socket 8. Keep-alive: 1. Socket alive: 0. Data available: 0. Configuration file change detected: 0. Requests received: 11.
Fabian Keil [Sun, 21 Oct 2012 13:00:06 +0000 (13:00 +0000)]
Keep track of how many requests have been received on a client socket
Fabian Keil [Sun, 21 Oct 2012 12:59:40 +0000 (12:59 +0000)]
In verify_request_length(), use clear_iob() when nuking pipelined data
Fabian Keil [Sun, 21 Oct 2012 12:59:08 +0000 (12:59 +0000)]
Rephrase #12 now that pipelining on incoming connections is supported
Fabian Keil [Sun, 21 Oct 2012 12:58:03 +0000 (12:58 +0000)]
Replace the IOB_RESET() macro with the new function clear_iob()
Fabian Keil [Sun, 21 Oct 2012 12:56:38 +0000 (12:56 +0000)]
Keep track of how many request are sent through a server connection
Fabian Keil [Sun, 21 Oct 2012 12:55:29 +0000 (12:55 +0000)]
In cgi_show_request() only restore the client request up to client_iob->cur
Everything beyond that hasn't been touched by get_header()
and thus doesn't need restoring.
Fabian Keil [Sun, 21 Oct 2012 12:54:15 +0000 (12:54 +0000)]
Deal with unsupported methods sent to the CGI pages by discarding any data following the headers
Fabian Keil [Sun, 21 Oct 2012 12:53:33 +0000 (12:53 +0000)]
Add optional client-side pipelining support
If the new config directive tolerate-pipelining is enabled,
Privoxy will keep pipelined client requests around to deal
with them once the current request has been served.
At the moment this is only done if the current request
is known to have no body.
Fabian Keil [Sun, 21 Oct 2012 12:52:35 +0000 (12:52 +0000)]
Let the IOB_PEEK macro take the iob as argument
Fabian Keil [Sun, 21 Oct 2012 12:51:57 +0000 (12:51 +0000)]
Let serve() wait for keep-alive-timeout seconds for new requests
The server connection timeout is no longer relevant.
Fabian Keil [Sun, 21 Oct 2012 12:51:07 +0000 (12:51 +0000)]
When closing the client socket in serve(), also log if a config file change has been detected
Fabian Keil [Sun, 21 Oct 2012 12:50:46 +0000 (12:50 +0000)]
chat() with the client as long as the connection state allows it
Due to various changes in the past, the state of the
server connection is no longer relevant.
Fabian Keil [Sun, 21 Oct 2012 12:49:54 +0000 (12:49 +0000)]
Remove a pointless fflush() call in chat()
Flushing all streams pretty much all the time for no obvious
reason is ridiculous.
Fabian Keil [Sun, 21 Oct 2012 12:44:58 +0000 (12:44 +0000)]
Set the socket option SO_LINGER for the client socket in accept_connection()
This should further reduce the chances of the client getting
an incomplete response, even though Privoxy wrote the whole
one to the socket.
Fabian Keil [Sun, 21 Oct 2012 12:42:18 +0000 (12:42 +0000)]
In chat(), check for failed delivery of request headers and body separately
Fabian Keil [Sun, 21 Oct 2012 12:39:27 +0000 (12:39 +0000)]
Use a dedicated iob for the data read from the client
This is necessary to support client-side pipelining.
Fabian Keil [Sun, 21 Oct 2012 12:36:25 +0000 (12:36 +0000)]
Use IOB_RESET() in prepare_csp_for_next_request()
Fabian Keil [Sun, 21 Oct 2012 12:35:15 +0000 (12:35 +0000)]
Let IOB_RESET() take the iob to reset as argument
This allows it to be used for iobs other than csp->iob.
Fabian Keil [Sun, 21 Oct 2012 12:34:15 +0000 (12:34 +0000)]
Remove pre-3.0 compatibility goo which has been obolete for more than 10 years now
Fabian Keil [Sun, 21 Oct 2012 12:33:52 +0000 (12:33 +0000)]
Do not promise a logrotate script for Red-Hat-based systems
It has been garbage collected in 2009.
Fabian Keil [Sun, 21 Oct 2012 12:33:27 +0000 (12:33 +0000)]
Clarify that the log detail of the Windows GUI log depends on the debug directive
Fabian Keil [Sun, 21 Oct 2012 12:32:21 +0000 (12:32 +0000)]
Parse the Windows-specific toggles with parse_toggle_state() as well
Fabian Keil [Sun, 21 Oct 2012 12:31:59 +0000 (12:31 +0000)]
In the redirect{} section, refer pcrs newbies to the 'filter file' section
Fabian Keil [Sun, 21 Oct 2012 12:31:21 +0000 (12:31 +0000)]
Use the correct type for reusable_connection.forwarder_type
Fabian Keil [Sun, 21 Oct 2012 12:30:51 +0000 (12:30 +0000)]
Accept and highlight: Continuing buffering server headers from socket 5. Bytes most recently read: 498.
Fabian Keil [Sun, 21 Oct 2012 12:30:37 +0000 (12:30 +0000)]
When logging the buffering of server headers in chat(), include their source
Fabian Keil [Wed, 17 Oct 2012 18:19:59 +0000 (18:19 +0000)]
Rename ACTION_NO_COOKIE_KEEP to ACTION_SESSION_COOKIES_ONLY to match the current name of the action
Fabian Keil [Wed, 17 Oct 2012 18:19:29 +0000 (18:19 +0000)]
Rename ACTION_NO_COOKIE_READ to ACTION_CRUNCH_OUTGOING_COOKIES to match the current name of the action
Fabian Keil [Wed, 17 Oct 2012 18:18:54 +0000 (18:18 +0000)]
Rename ACTION_NO_COOKIE_SET to ACTION_CRUNCH_INCOMING_COOKIES to match the current name of the action
Fabian Keil [Wed, 17 Oct 2012 18:13:26 +0000 (18:13 +0000)]
Fix grammar in an error message in remember_connection()
Fabian Keil [Wed, 17 Oct 2012 18:11:40 +0000 (18:11 +0000)]
Use strdup_or_die() in remember_connection()
Fabian Keil [Wed, 17 Oct 2012 18:11:19 +0000 (18:11 +0000)]
Fix latency calculation for shared connections
It has been broken since I committed it with 1.57 in 2009.
The calculated latency for most connections would be 0 due to
remember_connection() always putting the timestamps in the
first slot. Oops.
Fabian Keil [Wed, 17 Oct 2012 18:02:10 +0000 (18:02 +0000)]
Use parse_toggle_state() to get the global_toggle_state