-const char parsers_rcs[] = "$Id: parsers.c,v 1.274 2013/01/04 12:20:31 fabiankeil Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 1.278 2013/08/06 12:58:28 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/parsers.c,v $
multi_action_index = ACTION_MULTI_CLIENT_HEADER_TAGGER;
}
- if (filters_available(csp) == FALSE)
+ if (list_is_empty(csp->action->multi[multi_action_index])
+ || filters_available(csp) == FALSE)
{
- log_error(LOG_LEVEL_ERROR, "Inconsistent configuration: "
- "tagging enabled, but no taggers available.");
+ /* Return early if no taggers apply or if none are available. */
return JB_ERR_OK;
}
if (0 == size)
{
/*
- * There is to technical limitation which makes
+ * There is no technical limitation which makes
* it impossible to use empty tags, but I assume
* no one would do it intentionally.
*/
multi_action_index = ACTION_MULTI_CLIENT_HEADER_FILTER;
}
- if (filters_available(csp) == FALSE)
+ if (list_is_empty(csp->action->multi[multi_action_index])
+ || filters_available(csp) == FALSE)
{
- log_error(LOG_LEVEL_ERROR, "Inconsistent configuration: "
- "header filtering enabled, but no matching filters available.");
+ /* Return early if no filters apply or if none are available. */
return JB_ERR_OK;
}
* port information, parse and evaluate the Host
* header field.
*
- * Also, kill ill-formed HOST: headers as sent by
- * Apple's iTunes software when used with a proxy.
- *
* Parameters :
* 1 : csp = Current client state (buffers, headers, etc...)
* 2 : header = On input, pointer to header to modify.
{
char *p, *q;
- /*
- * If the header field name is all upper-case, chances are that it's
- * an ill-formed one from iTunes. BTW, killing innocent headers here is
- * not a problem -- they are regenerated later.
- */
- if ((*header)[1] == 'O')
- {
- log_error(LOG_LEVEL_HEADER, "Killed all-caps Host header line: %s", *header);
- freez(*header);
- return JB_ERR_OK;
- }
-
if (!csp->http->hostport || (*csp->http->hostport == '*') ||
*csp->http->hostport == ' ' || *csp->http->hostport == '\0')
{