+ * Revision 1.240 2009/04/09 10:12:54 fabiankeil
+ * Fix two cases in which an invalid server response would result
+ * in the client connection being closed without sending an error
+ * message first.
+ *
+ * Revision 1.239 2009/04/07 11:43:50 fabiankeil
+ * If the server rudely resets the connection directly after sending the
+ * headers, pass the mess to the client instead of sending an incorrect
+ * connect-failed message. Fixes #2698674 reported by mybugaccount.
+ *
+ * Revision 1.238 2009/03/27 14:42:30 fabiankeil
+ * Correct the status code for CONNECTION_TIMEOUT_RESPONSE.
+ *
+ * Revision 1.237 2009/03/27 14:32:04 fabiankeil
+ * If spawning a child in listen_loop() fails, send a real
+ * HTTP response to the client and continue listening for
+ * new connections without artificial delay.
+ *
+ * Revision 1.236 2009/03/25 17:30:24 fabiankeil
+ * In serve(), keep the client socket open until we marked the
+ * server socket as unused. This should increase the chances
+ * that we reuse the connection for the client's next request
+ * to the same destination.
+ *
+ * Revision 1.235 2009/03/18 21:01:20 fabiankeil
+ * Comment fix. Spotted by Roland.
+ *
+ * Revision 1.234 2009/03/18 20:48:42 fabiankeil
+ * If the --no-daemon option is used, enable LOG_LEVEL_INFO
+ * before the config file has been parsed (as we always did).
+ *
+ * Revision 1.233 2009/03/13 14:10:07 fabiankeil
+ * Fix some more harmless warnings on amd64.
+ *
+ * Revision 1.232 2009/03/08 19:29:16 fabiankeil
+ * Reinitialize the timeout structure every time before passing
+ * it to select(). Apparently some implementations mess with it.
+ * Probably fixes #2669131 reported by cyberpatrol.
+ *
+ * Revision 1.231 2009/03/08 14:19:23 fabiankeil
+ * Fix justified (but harmless) compiler warnings
+ * on platforms where sizeof(int) < sizeof(long).
+ *
+ * Revision 1.230 2009/03/07 13:09:17 fabiankeil
+ * Change csp->expected_content and_csp->expected_content_length from
+ * size_t to unsigned long long to reduce the likelihood of integer
+ * overflows that would let us close the connection prematurely.
+ * Bug found while investigating #2669131, reported by cyberpatrol.
+ *
+ * Revision 1.229 2009/03/07 11:17:01 fabiankeil
+ * Fix compiler warning.
+ *
+ * Revision 1.228 2009/03/06 20:30:13 fabiankeil
+ * Log unsigned values as such.
+ *
+ * Revision 1.227 2009/03/02 19:18:11 fabiankeil
+ * Streamline parse_http_request()'s prototype. As
+ * cparser pointed out it doesn't actually use csp.
+ *
+ * Revision 1.226 2009/03/01 18:28:24 fabiankeil
+ * Help clang understand that we aren't dereferencing
+ * NULL pointers here.
+ *
+ * Revision 1.225 2009/02/19 18:09:32 fabiankeil
+ * Unbreak build without FEATURE_CONNECTION_KEEP_ALIVE.
+ * Noticed by David.
+ *
+ * Revision 1.224 2009/02/14 15:32:04 fabiankeil
+ * Add the request URL to the timeout message in chat().
+ * Suggested by Lee.
+ *
+ * Revision 1.223 2009/02/09 21:21:16 fabiankeil
+ * Now that init_log_module() is called earlier, call show_version()
+ * later on from main() directly so it doesn't get called for --help
+ * or --version.
+ *
+ * Revision 1.222 2009/02/08 12:56:51 fabiankeil
+ * Call initialize_mutexes() before init_log_module() again.
+ * Broken since r220, might be the cause of Lee's #2579448.
+ *
+ * Revision 1.221 2009/02/06 18:02:58 fabiankeil
+ * When dropping privileges, also give up membership in supplementary
+ * groups. Thanks to Matthias Drochner for reporting the problem,
+ * providing the initial patch and testing the final version.
+ *
+ * Revision 1.220 2009/02/04 18:29:07 fabiankeil
+ * Initialize the log module before parsing arguments.
+ * Thanks to Matthias Drochner for the report.
+ *
+ * Revision 1.219 2009/01/31 16:08:21 fabiankeil
+ * Remove redundant error check in receive_client_request().
+ *
+ * Revision 1.218 2009/01/31 12:25:54 fabiankeil
+ * Flatten indentation in receive_client_request().
+ *
+ * Revision 1.217 2009/01/07 19:50:09 fabiankeil
+ * - If the socket-timeout has been reached and the client
+ * hasn't received any data yet, send an explanation before
+ * closing the connection.
+ * - In get_request_line(), signal timeouts the right way.
+ *
+ * Revision 1.216 2008/12/24 22:13:11 ler762
+ * fix GCC 3.4.4 warning
+ *
+ * Revision 1.215 2008/12/24 17:06:19 fabiankeil
+ * Keep a thread around to timeout alive connections
+ * even if no new requests are coming in.
+ *
+ * Revision 1.214 2008/12/20 14:53:55 fabiankeil
+ * Add config option socket-timeout to control the time
+ * Privoxy waits for data to arrive on a socket. Useful
+ * in case of stale ssh tunnels or when fuzz-testing.
+ *
+ * Revision 1.213 2008/12/15 18:45:51 fabiankeil
+ * When logging crunches, log the whole URL, so one can easily
+ * differentiate between vanilla HTTP and CONNECT requests.
+ *
+ * Revision 1.212 2008/12/14 15:46:22 fabiankeil
+ * Give crunched requests their own log level.
+ *
+ * Revision 1.211 2008/12/06 10:05:03 fabiankeil
+ * Downgrade "Received x bytes while expecting y." message to
+ * LOG_LEVEL_CONNECT as it doesn't necessarily indicate an error.
+ *
+ * Revision 1.210 2008/12/02 22:03:18 fabiankeil
+ * Don't miscalculate byte_count if we don't get all the
+ * server headers with one read_socket() call. With keep-alive
+ * support enabled, this caused delays until the server closed
+ * the connection.
+ *
+ * Revision 1.209 2008/11/27 09:44:04 fabiankeil
+ * Cosmetics for the last commit: Don't watch out for
+ * the last chunk if the content isn't chunk-encoded or
+ * if we already determined the content length previously.
+ *
+ * Revision 1.208 2008/11/26 18:24:17 fabiankeil
+ * Recognize that the server response is complete if the
+ * last chunk is read together with the server headers.
+ * Reported by Lee.
+ *