Branch: Tag:

2002-10-02

2002-10-02 00:01:19 by Martin Nilsson <mani@lysator.liu.se>

search -> has_value/has_prefix

Rev: server/pike_modules/Roxen.pmod:1.147
Rev: server/plugins/protocols/ftp.pike:2.82
Rev: server/plugins/protocols/http.pike:1.382

2:   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 2001, Roxen IS.    - constant cvs_version = "$Id: http.pike,v 1.381 2002/10/01 23:19:36 nilsson Exp $"; + constant cvs_version = "$Id: http.pike,v 1.382 2002/10/01 23:55:49 nilsson Exp $";   // #define REQUEST_DEBUG   #define MAGIC_ERROR   
659:    mixed tmp1,tmp2;       foreach(tmp2 = (raw / "\n"), tmp1) { -  if(!search(lower_case(tmp1), "proxy-authorization:")) +  if(has_prefix(lower_case(tmp1), "proxy-authorization:"))    tmp2 -= ({tmp1});    }    raw = tmp2 * "\n";
822:       case "request-range":    contents = lower_case(contents-" "); -  if(!search(contents, "bytes")) +  if(has_prefix(contents, "bytes"))    // Only care about "byte" ranges.    misc->range = contents[6..];    break;       case "range":    contents = lower_case(contents-" "); -  if(!misc->range && !search(contents, "bytes")) +  if(!misc->range && has_prefix(contents, "bytes"))    // Only care about "byte" ranges. Also the Request-Range header    // has precedence since Stupid Netscape (TM) sends both but can't    // handle multipart/byteranges but only multipart/x-byteranges.
1994:    conf =    port_obj->find_configuration_for_url(port_obj->name + "://" +    misc->host + -  (search(misc->host, ":")<0? -  (":"+port_obj->port):"") + +  (has_value(misc->host, ":")<0? +  "":(":"+port_obj->port)) +    raw_url,    this_object());    } else {