Branch: Tag:

2008-12-17

2008-12-17 10:02:18 by 0

The type field in a result mapping may hold an array of strings during
requests for e.g. .tar.gz files.

Rev: server/modules/examples/filter.pike:1.5
Rev: server/modules/filters/tableborder.pike:1.14
Rev: server/modules/filters/whitespace_remover.pike:1.5
Rev: server/modules/filters/word_highlight.pike:1.5
Rev: server/modules/js-support/javascript_support.pike:1.70
Rev: server/modules/tags/email.pike:1.47
Rev: server/modules/tags/rxmltags.pike:1.580
Rev: server/modules/throttling/throttling_bytype.pike:1.11

3:   inherit "module";   // All roxen modules must inherit module.pike    - constant cvs_version = "$Id: filter.pike,v 1.4 2004/06/30 16:58:58 mast Exp $"; + constant cvs_version = "$Id: filter.pike,v 1.5 2008/12/17 10:01:47 jonasw Exp $";   constant module_type = MODULE_FILTER;   constant module_name = "RefDoc for MODULE_FILTER";   constant module_doc = "This module does nothing, but its inlined "
35:   {    seen++;    last_seen = result; +  string|array(string) type = result->type; +  if (arrayp(type)) +  type = type[0];    if(!result // If nobody had anything to say, neither do we.    || !stringp(result->data) // Got a file descriptor. Hardly ever happens anyway.    || !id->prestate->filterpass // No prestate, no action for this module. -  || !glob("text/*", result->type) // Only touch content types we're interested in. +  || !glob("text/*", type) // Only touch content types we're interested in.    )    return 0;