-const char parsers_rcs[] = "$Id: parsers.c,v 1.38 2001/10/25 03:40:48 david__schmidt Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 1.40 2001/10/26 20:13:09 jongfoster Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/parsers.c,v $
*
* Revisions :
* $Log: parsers.c,v $
+ * Revision 1.40 2001/10/26 20:13:09 jongfoster
+ * ctype.h is needed in Windows, too.
+ *
+ * Revision 1.39 2001/10/26 17:40:04 oes
+ * Introduced get_header_value()
+ * Removed http->user_agent, csp->referrer and csp->accept_types
+ * Removed client_accept()
+ *
* Revision 1.38 2001/10/25 03:40:48 david__schmidt
* Change in porting tactics: OS/2's EMX porting layer doesn't allow multiple
* threads to call select() simultaneously. So, it's time to do a real, live,
#ifndef _WIN32
#include <stdio.h>
#include <sys/types.h>
-#include <stdlib.h>
-#include <ctype.h>
#endif
+#include <stdlib.h>
+#include <ctype.h>
#include <assert.h>
#include <string.h>
char *server_set_cookie(const struct parsers *v, const char *s, struct client_state *csp)
{
#ifdef FEATURE_COOKIE_JAR
+
+ /*
+ * Write timestamp into outbuf.
+ *
+ * Complex because not all OSs have tm_gmtoff or
+ * the %z field in strftime()
+ */
+ char tempbuf[ BUFFER_SIZE ];
+ time_t now;
+ struct tm *tm_now;
+ time (&now);
+ tm_now = localtime (&now);
+ strftime (tempbuf, BUFFER_SIZE-6, "%b %d %H:%M:%S ", tm_now);
+
if (csp->config->jar)
{
- fprintf(csp->config->jar, "%s\t%s\n", csp->http->host, (s + v->len + 1));
+ fprintf(csp->config->jar, "%s %s\t%s\n", tempbuf, csp->http->host, (s + v->len + 1));
}
#endif /* def FEATURE_COOKIE_JAR */