Roxen.git / server / modules / configuration / roxen_test.pike

version» Context lines:

Roxen.git/server/modules/configuration/roxen_test.pike:1:   // This is a roxen module. Copyright © 2000 - 2009, Roxen IS.      #include <module.h>   inherit "module";    - constant cvs_version = "$Id: roxen_test.pike,v 1.93 2012/02/14 19:52:54 mast Exp $"; + constant cvs_version = "$Id$";   constant thread_safe = 1;   constant module_type = MODULE_TAG|MODULE_PROVIDER;   constant module_name = "Roxen self test module";   constant module_doc = "Tests Roxen WebServer.";   constant is_roxen_tester_module = 1;      Configuration conf;   Stdio.File index_file;   Protocol port;   RoxenModule rxmlparser;
Roxen.git/server/modules/configuration/roxen_test.pike:517:    break;    case "request_header":    id->request_headers[m->name] = m->value;    break;    }    },       "login" : lambda(Parser.HTML p, mapping m) {    id->realauth = m->user + ":" + m->password;    id->request_headers->authorization = -  "Basic " + MIME.encode_base64 (id->realauth); +  "Basic " + MIME.encode_base64 (id->realauth, 1);    conf->authenticate(id);    },    ]) );       if( mixed error = catch(parser->finish(c)) ) {    if (error != 1)    // Use master()->describe_backtrace() to bypass background_failure() and    // avoid counting this error twice.    test_error ("Failed to parse test: " +    master()->describe_backtrace (error));
Roxen.git/server/modules/configuration/roxen_test.pike:564:   }      void run_xml_tests(string data) {    mapping(int:RXML.PCode) p_code_cache = ([]);    multiset(string) used_modules = (<>);       // El cheapo xml header parser.    if (has_prefix (data, "<?xml")) {    sscanf (data, "%[^\n]", string s);    if (sscanf (s, "%*sencoding=\"%s\"", s) == 2) -  data = Locale.Charset.decoder (s)->feed (data)->drain(); +  data = Charset.decoder (s)->feed (data)->drain();    }       ltests=0;    lfails=0;       test_num = 0;    pass = 1;    Roxen.get_xml_parser()->add_containers( ([    "add-module" : xml_add_module,    "drop-module" : xml_dummy /* xml_drop_module */,