Branch: Tag:

2008-12-17

2008-12-17 10:02:18 by Jonas Wallden <jonasw@roxen.com>

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

6:    * a "library" program plus a tiny imlpementation module    */    - constant cvs_version="$Id: throttling_bytype.pike,v 1.10 2004/06/30 16:59:32 mast Exp $"; + constant cvs_version="$Id: throttling_bytype.pike,v 1.11 2008/12/17 10:02:18 jonasw Exp $";      #include <module.h>   inherit "throttlelib";
49:   array find_rule (mapping res, object id,    array(string) rulenames, mapping rules) {    if (!res) return 0; -  return low_find_rule(res->type, rulenames, rules); +  string|array(string) type = res->type; +  if (arrayp(type)) +  type = type[0]; +  return low_find_rule(type, rulenames, rules);   }