X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=parsers.c;h=c5d0a9b39d6aec34eb488c084e7ace0c53d7d5d0;hp=0bcdc422009e4f8ec3b8888e92ca0c549a6023af;hb=8ef1cce0e3dfe6b68730d19d68cbb628219ebf39;hpb=3ae301616db25944b4271fb465c625d0e6ebd8be diff --git a/parsers.c b/parsers.c index 0bcdc422..c5d0a9b3 100644 --- a/parsers.c +++ b/parsers.c @@ -1,4 +1,4 @@ -const char parsers_rcs[] = "$Id: parsers.c,v 1.136 2008/05/26 16:02:24 fabiankeil Exp $"; +const char parsers_rcs[] = "$Id: parsers.c,v 1.137 2008/05/30 15:50:08 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/parsers.c,v $ @@ -44,6 +44,10 @@ const char parsers_rcs[] = "$Id: parsers.c,v 1.136 2008/05/26 16:02:24 fabiankei * * Revisions : * $Log: parsers.c,v $ + * Revision 1.137 2008/05/30 15:50:08 fabiankeil + * Remove questionable micro-optimizations + * whose usefulness has never been measured. + * * Revision 1.136 2008/05/26 16:02:24 fabiankeil * s@Insufficent@Insufficient@ * @@ -3967,35 +3971,8 @@ static jb_err server_set_cookie(struct client_state *csp, char **header) { time_t now; time_t cookie_time; - struct tm tm_now; - time(&now); -#ifdef FEATURE_COOKIE_JAR - if (csp->config->jar) - { - /* - * Write timestamp into outbuf. - * - * Complex because not all OSs have tm_gmtoff or - * the %z field in strftime() - */ - char tempbuf[ BUFFER_SIZE ]; - -#ifdef HAVE_LOCALTIME_R - tm_now = *localtime_r(&now, &tm_now); -#elif FEATURE_PTHREAD - pthread_mutex_lock(&localtime_mutex); - tm_now = *localtime (&now); - pthread_mutex_unlock(&localtime_mutex); -#else - tm_now = *localtime (&now); -#endif - strftime(tempbuf, BUFFER_SIZE-6, "%b %d %H:%M:%S ", &tm_now); - - /* strlen("set-cookie: ") = 12 */ - fprintf(csp->config->jar, "%s %s\t%s\n", tempbuf, csp->http->host, *header + 12); - } -#endif /* def FEATURE_COOKIE_JAR */ + time(&now); if ((csp->action->flags & ACTION_NO_COOKIE_SET) != 0) {