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
Fabian Keil [Wed, 17 Oct 2012 18:01:34 +0000 (18:01 +0000)]
Downgrade two error messages in drain_and_close_socket() to LOG_LEVEL_CONNECT
The errors are expected if the connection is closed on the remote
end after drain_and_close_socket() confirmed that the socket is
still alive, but before it tries to drain it.
Fabian Keil [Fri, 12 Oct 2012 11:23:53 +0000 (11:23 +0000)]
Fix a comment typo.
Fabian Keil [Fri, 12 Oct 2012 11:19:35 +0000 (11:19 +0000)]
Use the shiny-new drain_and_close_socket() when closing client sockets in serve()
Hopefully this fixes the page truncation issue reported
with Opera in #
3464439.
Fabian Keil [Fri, 12 Oct 2012 11:17:48 +0000 (11:17 +0000)]
Add drain_and_close_socket()
Apparently on some platforms immediately closing a client socket
with both unread and written-but-not-yet-transmitted data may result
in the connection being teared down prematurely, in which case
the client ends up with an incomplete response.
To prevent this, drain_and_close_socket() shuts down our side of
the connection (on platforms with shutdown()), drains the unread
data on the socket and finally calls close_socket().
I suspect that this was the main cause of the page truncation
issues reported with Opera in #
3464439.
Fabian Keil [Fri, 12 Oct 2012 11:15:17 +0000 (11:15 +0000)]
Don't bother checking for strstr() as we have no fallback anyway
Fabian Keil [Fri, 12 Oct 2012 11:12:22 +0000 (11:12 +0000)]
Spread a AC_CHECK_FUNCS() line across one line per checked function to make future diffs more readable
Fabian Keil [Fri, 12 Oct 2012 11:11:42 +0000 (11:11 +0000)]
Remove two checks that were already commented out
Fabian Keil [Fri, 12 Oct 2012 11:11:06 +0000 (11:11 +0000)]
Spread the AC_CHECK_HEADERS() check across one line per header to make future diffs more readable
Fabian Keil [Fri, 12 Oct 2012 11:10:10 +0000 (11:10 +0000)]
Update server_proxy_connection_adder()'s description to reflect reality
Fabian Keil [Fri, 12 Oct 2012 11:09:27 +0000 (11:09 +0000)]
Add DragonFly to the list of BSDs Privoxy is known to run on
Fabian Keil [Fri, 12 Oct 2012 11:08:55 +0000 (11:08 +0000)]
Add Haiku to the list of operating systems Privoxy is known to run on
Fabian Keil [Fri, 5 Oct 2012 12:16:23 +0000 (12:16 +0000)]
Move a variable declaration in parse_client_header_order() to the beginning of its code block
It's how we usually do it and is apparently also required
when compiling with gcc 2.95.
Initial patch submitted by Simon South in #
3564815.
Fabian Keil [Fri, 5 Oct 2012 12:15:39 +0000 (12:15 +0000)]
Move a couple of variable declarations in get_last_url() to the beginning of their code block
It's how we usually do it and is apparently also required
when compiling with gcc 2.95.
Initial patch submitted by Simon South in #
3564815.
Fabian Keil [Fri, 5 Oct 2012 12:14:33 +0000 (12:14 +0000)]
Additional Haiku-specific improvements
- Disable checks intended for multi-user systems
(as Haiku is presently single-user).
- Group Haiku-specific settings in their own section,
following the pattern for Solaris, OS/2 and AmigaOS
- Add additional library-related settings to remove
the need for providing configure with custom LDFLAGS.
Submitted by Simon South in #
3574538.
Fabian Keil [Wed, 26 Sep 2012 15:20:54 +0000 (15:20 +0000)]
Spell 'refresh-tags' correctly
Reported by Don in #
3571927.
Fabian Keil [Thu, 20 Sep 2012 11:22:20 +0000 (11:22 +0000)]
Documentation for 3.0.19, regenerated with the modified tidy changes
Fabian Keil [Thu, 20 Sep 2012 10:44:18 +0000 (10:44 +0000)]
Bring back the body attributes now that tidy no longer messes them up
Apparently they aren't entirely useless as they prevent
the Docbook mess from inserting other attributes.
Fabian Keil [Thu, 20 Sep 2012 10:43:41 +0000 (10:43 +0000)]
Leave it up to the user whether or not smart tags are inserted
Fabian Keil [Thu, 20 Sep 2012 10:43:11 +0000 (10:43 +0000)]
Ditch pointless keywords. Search engines no longer need them.
Fabian Keil [Thu, 20 Sep 2012 10:42:49 +0000 (10:42 +0000)]
Remove tidy's clean flag as it changes the scope of attributes
Link-specific colors end up being applied to all text.
Reported by Adam Piggott in #
3569551.
Fabian Keil [Thu, 20 Sep 2012 09:05:06 +0000 (09:05 +0000)]
Ditch obsolete body attributes
The style sheets are sufficient and the body attributes
didn't properly make it through the docbook/tidy chain,
causing link-specific attributes to be applied to all text.
Reported by Adam Piggott in #
3569551.
Fabian Keil [Tue, 18 Sep 2012 18:29:55 +0000 (18:29 +0000)]
In finish_http_response(), set 'Connection: close' after preventing pipelining
I missed the CGI parts when committing parsers.c v1.250.
Fabian Keil [Tue, 18 Sep 2012 17:39:29 +0000 (17:39 +0000)]
Revert an incorrect part of 1.250 that could result in two Connection headers being sent
Fabian Keil [Wed, 5 Sep 2012 08:40:59 +0000 (08:40 +0000)]
On Haiku, do not pass -lpthread to the compiler
Haiku's pthreads implementation is contained in its system library,
libroot, so no additional library needs to be searched.
Patch submitted by Simon South in #
3564815.
Fabian Keil [Tue, 4 Sep 2012 08:40:25 +0000 (08:40 +0000)]
Accept and highlight: Accepted connection from 10.0.0.1 on socket 5
Fabian Keil [Tue, 4 Sep 2012 08:39:58 +0000 (08:39 +0000)]
Relocate the connection-accepted message from listen_loop() to serve()
This way it's printed by the thread that is actually serving the
connection which is nice when grepping for thread ids in log files.
While at it, use an upper-case first character which is more
consistent with the other log messages.
Fabian Keil [Tue, 4 Sep 2012 08:39:30 +0000 (08:39 +0000)]
Stop suppressing messages about accepted client connections and highlight them properly
Fabian Keil [Tue, 4 Sep 2012 08:39:02 +0000 (08:39 +0000)]
Fix a comment in client_connection()
Fabian Keil [Tue, 4 Sep 2012 08:38:31 +0000 (08:38 +0000)]
After preventing the client from pipeling, don't signal keep-alive intentions
When looking at the response headers alone, it previously wasn't
obvious from the client's perspective that no additional responses
should be expected.
This might improve compatibility with Opera (#
3464439).
Fabian Keil [Tue, 4 Sep 2012 08:37:51 +0000 (08:37 +0000)]
Figure out the request length before running sed()
We may want to adjust the Connection header based on the information.