X-Git-Url: http://www.privoxy.org/gitweb/-%22http:/sourceforge.net/static/git-logo.png?a=blobdiff_plain;f=parsers.c;h=ea8d42feee6f4f9b254ebc32c450f437f213a181;hb=586bfca46bfe323d315560b3e8d00c4530371051;hp=e9b6d1c72a95180beb08f38ae578e58a014f5ae1;hpb=d985aef36f256bbb3dc1836631660d21b3d9252c;p=privoxy.git diff --git a/parsers.c b/parsers.c index e9b6d1c7..ea8d42fe 100644 --- a/parsers.c +++ b/parsers.c @@ -1,7 +1,7 @@ -const char parsers_rcs[] = "$Id: parsers.c,v 1.56 2002/05/12 15:34:22 jongfoster Exp $"; +const char parsers_rcs[] = "$Id: parsers.c,v 1.56.2.3 2002/11/10 04:20:02 hal9 Exp $"; /********************************************************************* * - * File : $Source: /cvsroot/ijbswa//current/Attic/parsers.c,v $ + * File : $Source: /cvsroot/ijbswa/current/Attic/parsers.c,v $ * * Purpose : Declares functions to parse/crunch headers and pages. * Functions declared include: @@ -40,6 +40,23 @@ const char parsers_rcs[] = "$Id: parsers.c,v 1.56 2002/05/12 15:34:22 jongfoster * * Revisions : * $Log: parsers.c,v $ + * Revision 1.56.2.3 2002/11/10 04:20:02 hal9 + * Fix typo: supressed -> suppressed + * + * Revision 1.56.2.2 2002/09/25 14:59:53 oes + * Improved cookie logging + * + * Revision 1.56.2.1 2002/09/25 14:52:45 oes + * Added basic support for OPTIONS and TRACE HTTP methods: + * - New parser function client_max_forwards which decrements + * the Max-Forwards HTTP header field of OPTIONS and TRACE + * requests by one before forwarding + * - New parser function client_host which extracts the host + * and port information from the HTTP header field if the + * request URI was not absolute + * - Don't crumble and re-add the Host: header, but only generate + * and append if missing + * * Revision 1.56 2002/05/12 15:34:22 jongfoster * Fixing typo in a comment * @@ -402,6 +419,11 @@ const char parsers_rcs[] = "$Id: parsers.c,v 1.56 2002/05/12 15:34:22 jongfoster #include #endif +#ifdef OSX_DARWIN +#include +#include "jcc.h" +/* jcc.h is for mutex semapores only */ +#endif /* def OSX_DARWIN */ #include "project.h" #include "list.h" #include "parsers.h" @@ -998,7 +1020,7 @@ jb_err client_accept_encoding(struct client_state *csp, char **header) { if ((csp->action->flags & ACTION_NO_COMPRESSION) != 0) { - log_error(LOG_LEVEL_HEADER, "Supressed offer to compress content"); + log_error(LOG_LEVEL_HEADER, "Suppressed offer to compress content"); freez(*header); if (!strcmpic(csp->http->ver, "HTTP/1.1")) @@ -1038,7 +1060,7 @@ jb_err client_te(struct client_state *csp, char **header) if ((csp->action->flags & ACTION_NO_COMPRESSION) != 0) { freez(*header); - log_error(LOG_LEVEL_HEADER, "Supressed offer to compress transfer"); + log_error(LOG_LEVEL_HEADER, "Suppressed offer to compress transfer"); } return JB_ERR_OK; @@ -1282,7 +1304,7 @@ jb_err client_send_cookie(struct client_state *csp, char **header) } else { - log_error(LOG_LEVEL_HEADER, " crunch!"); + log_error(LOG_LEVEL_HEADER, "Crunched outgoing cookie -- yum!"); } /* @@ -1761,6 +1783,10 @@ jb_err server_set_cookie(struct client_state *csp, char **header) time (&now); #ifdef HAVE_LOCALTIME_R tm_now = *localtime_r(&now, &tm_now); +#elif OSX_DARWIN + pthread_mutex_lock(&localtime_mutex); + tm_now = *localtime (&now); + pthread_mutex_unlock(&localtime_mutex); #else tm_now = *localtime (&now); #endif @@ -1773,6 +1799,7 @@ jb_err server_set_cookie(struct client_state *csp, char **header) if ((csp->action->flags & ACTION_NO_COOKIE_SET) != 0) { + log_error(LOG_LEVEL_HEADER, "Crunched incoming cookie -- yum!"); return crumble(csp, header); } else if ((csp->action->flags & ACTION_NO_COOKIE_KEEP) != 0)