X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=jcc.c;h=482e8107a1474c5773b347148ed7b3cb99ad0da7;hb=98d0c48b4c00026b5f23e0aa7ef6598fefe89cb3;hp=86a3092b8d011c025db074a1014caa6fc723e260;hpb=f00a27bae5b77921428d29e18dca7105fae46e3d;p=privoxy.git diff --git a/jcc.c b/jcc.c index 86a3092b..482e8107 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.154 2007/10/19 17:00:08 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.157 2007/11/03 17:34:49 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -33,6 +33,18 @@ const char jcc_rcs[] = "$Id: jcc.c,v 1.154 2007/10/19 17:00:08 fabiankeil Exp $" * * Revisions : * $Log: jcc.c,v $ + * Revision 1.157 2007/11/03 17:34:49 fabiankeil + * Log the "weak randomization factor" warning only + * once for mingw32 and provide some more details. + * + * Revision 1.156 2007/11/01 18:20:58 fabiankeil + * Initialize log module after initializing mutexes, future + * deadlocks in that code should now work cross-platform. + * + * Revision 1.155 2007/10/23 20:12:45 fabiankeil + * Fix first CSUCCEED line to end in \r\n as required by RFC1945. + * Reported by Bert van Leeuwen in BR#1818808. + * * Revision 1.154 2007/10/19 17:00:08 fabiankeil * Downgrade "Flushing header and buffers" message to LOG_LEVEL_INFO. * @@ -2509,6 +2521,9 @@ static void chat(struct client_state *csp) * This is NOT the body, so * Let's pretend the server just sent us a blank line. */ + log_error(LOG_LEVEL_INFO, + "Malformerd HTTP headers detected and MS IIS5 hack enabled. " + "Expect an invalid response or even no response at all."); snprintf(buf, sizeof(buf), "\r\n"); len = (int)strlen(buf); @@ -2953,8 +2968,6 @@ int main(int argc, const char *argv[]) #endif ; - init_log_module(Argv[0]); - /* * Parse the command line arguments * @@ -3101,6 +3114,7 @@ int main(int argc, const char *argv[]) files->next = NULL; clients->next = NULL; + /* XXX: factor out initialising after the next stable release. */ #ifdef AMIGA InitAmiga(); #elif defined(_WIN32) @@ -3110,9 +3124,21 @@ int main(int argc, const char *argv[]) /* Prepare mutexes if supported and necessary. */ initialize_mutexes(); + /* Enable logging until further notice. */ + init_log_module(Argv[0]); + random_seed = (unsigned int)time(NULL); #ifdef HAVE_RANDOM srandom(random_seed); +#elif defined (_WIN32) + /* + * See pick_from_range() in miscutil.c for details. + */ + log_error(LOG_LEVEL_INFO, + "No thread-safe PRNG implemented for your platform. " + "Using weak \'randomization\' factor which will " + "limit the already questionable usefulness of " + "header-time-randomizing actions (disabled by default)."); #else srand(random_seed); #endif /* ifdef HAVE_RANDOM */