-const char parsers_rcs[] = "$Id: parsers.c,v 1.1 2001/05/13 21:57:06 administrator Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 1.2 2001/05/17 23:02:36 oes Exp $";
/*********************************************************************
*
- * File : $Source: /home/administrator/cvs/ijb/parsers.c,v $
+ * File : $Source: /cvsroot/ijbswa/current/parsers.c,v $
*
* Purpose : Declares functions to parse/crunch headers and pages.
* Functions declared include:
*
* Revisions :
* $Log: parsers.c,v $
+ * Revision 1.2 2001/05/17 23:02:36 oes
+ * - Made referrer option accept 'L' as a substitute for '§'
+ *
+ * Revision 1.1.1.1 2001/05/15 13:59:01 oes
+ * Initial import of version 2.9.3 source tree
+ *
*
*********************************************************************/
\f
const struct parsers server_patterns[] = {
{ "set-cookie:", 11, server_set_cookie },
{ "connection:", 11, crumble },
-#ifdef PCRS
+#if defined(PCRS) || defined(KILLPOPUPS)
{ "Content-Type:", 13, content_type },
{ "Content-Length:", 15, crumble },
-#endif /* def PCRS */
+#endif /* defined(PCRS) || defined(KILLPOPUPS) */
{ NULL, 0, NULL }
};
}
-#ifdef PCRS
+#if defined(PCRS) || defined(KILLPOPUPS)
/*********************************************************************
*
}
-#endif /* def PCRS */
+#endif /* defined(PCRS) || defined(KILLPOPUPS) */
/*********************************************************************
if (*referrer == '@')
{
- if (csp->send_user_cookie)
+ if (csp->permissions & PERMIT_COOKIE_READ)
{
return(strdup(s));
}
}
/*
- * New option §: Forge a referer as http://[hostname:port of REQUEST]/
+ * New option § or L: Forge a referer as http://[hostname:port of REQUEST]/
* to fool stupid checks for in-site links
*/
- if (*referrer == '§')
+ if (*referrer == '§' || *referrer == 'L')
{
- if (csp->send_user_cookie)
+ if (csp->permissions & PERMIT_COOKIE_READ)
{
return(strdup(s));
}
if (*uagent == '@')
{
- if (csp->send_user_cookie)
+ if (csp->permissions & PERMIT_COOKIE_READ)
{
return(strdup(s));
}
if (*uagent == '@')
{
- if (csp->send_user_cookie)
+ if (csp->permissions & PERMIT_COOKIE_READ)
{
return(strdup(s));
}
*********************************************************************/
char *client_send_cookie(const struct parsers *v, char *s, struct client_state *csp)
{
- if (csp->send_user_cookie)
+ if (csp->permissions & PERMIT_COOKIE_READ)
{
enlist(csp->cookie_list, s + v->len + 1);
}
}
#endif /* def JAR_FILES */
- if (csp->accept_server_cookie == 0)
+ if (!(csp->permissions & PERMIT_COOKIE_SET))
{
return(crumble(v, s, csp));
}