-const char jcc_rcs[] = "$Id: jcc.c,v 1.155 2007/10/23 20:12:45 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.158 2007/11/11 16:44:17 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
*
* Revisions :
* $Log: jcc.c,v $
+ * Revision 1.158 2007/11/11 16:44:17 fabiankeil
+ * Emit a log message when activating the MS IIS5 hack.
+ *
+ * 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.
"Proxy-Agent: Privoxy/" VERSION "\r\n\r\n";
static const char CHEADER[] =
- "HTTP/1.0 400 Invalid header received from browser\r\n"
+ "HTTP/1.0 400 Invalid header received from client\r\n"
"Proxy-Agent: Privoxy " VERSION "\r\n"
"Content-Type: text/plain\r\n"
"Connection: close\r\n\r\n"
- "Invalid header received from browser.\r\n";
+ "Invalid header received from client.\r\n";
static const char CFORBIDDEN[] =
"HTTP/1.0 403 Connection not allowable\r\n"
"Connection: close\r\n\r\n";
static const char FTP_RESPONSE[] =
- "HTTP/1.0 400 Invalid request received from browser\r\n"
+ "HTTP/1.0 400 Invalid request received from client\r\n"
"Content-Type: text/plain\r\n"
"Connection: close\r\n\r\n"
"Invalid request. Privoxy doesn't support FTP.\r\n";
static const char GOPHER_RESPONSE[] =
- "HTTP/1.0 400 Invalid request received from browser\r\n"
+ "HTTP/1.0 400 Invalid request received from client\r\n"
"Content-Type: text/plain\r\n"
"Connection: close\r\n\r\n"
"Invalid request. Privoxy doesn't support gopher.\r\n";
/* XXX: should be a template */
static const char MISSING_DESTINATION_RESPONSE[] =
- "HTTP/1.0 400 Bad request received from browser\r\n"
+ "HTTP/1.0 400 Bad request received from client\r\n"
"Proxy-Agent: Privoxy " VERSION "\r\n"
"Content-Type: text/plain\r\n"
"Connection: close\r\n\r\n"
#if 0
/* XXX: should be a template */
static const char NULL_BYTE_RESPONSE[] =
- "HTTP/1.0 400 Bad request received from browser\r\n"
+ "HTTP/1.0 400 Bad request received from client\r\n"
"Proxy-Agent: Privoxy " VERSION "\r\n"
"Content-Type: text/plain\r\n"
"Connection: close\r\n\r\n"
* 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);
files->next = NULL;
clients->next = NULL;
+ /* XXX: factor out initialising after the next stable release. */
#ifdef AMIGA
InitAmiga();
#elif defined(_WIN32)
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 */