Roxen.git / server / etc / test / tests / http / RoxenTest_webdav.pike

version» Context lines:

Roxen.git/server/etc/test/tests/http/RoxenTest_webdav.pike:236:       Stdio.mkdirhier(real_dir);   }      void run_tests(Configuration conf)   {    setup();       // Run the suite once with every http protocol modules in the conf.    // This allows for testing such things as sub-path mounted sites etc. -  foreach(conf->registered_urls, string url) { +  foreach(conf->registered_urls, string full_url) {    mapping(string:string|Configuration|array(Protocol)) port_info = -  roxen.urls[url]; +  roxen.urls[full_url];    if (!test_true(mappingp, port_info)) continue;    array(Protocol) ports = port_info->ports;    if (!test_true(arrayp, ports)) continue;    foreach(ports, Protocol prot) {    if (!test_true(stringp, prot->prot_name)) continue;    if (prot->prot_name != "http") continue;       if (prot->bound != 1) continue;       if (!test_true(mappingp, prot->urls)) continue; -  +  +  // Strip the fragment from the full_url. +  string url = (full_url/"#")[0];    mapping(string:mixed) url_data = prot->urls[url];    if (!test_true(mappingp, url_data)) continue;    report_debug("url data: %O\n", url_data);    test_true(`==, url_data->conf, conf);    test_true(`==, url_data->port, prot);    test_true(stringp, url_data->hostname);    test_true(stringp, url_data->path || "/");       Standards.URI url_uri = Standards.URI(url, "http://*/");    base_uri = -  Standards.URI((url_data->path || "/") + webdav_mount_point, url_uri); +  Standards.URI(Stdio.append_path(url_data->path || "/", +  webdav_mount_point), url_uri);    base_uri->port = prot->port;    base_uri->host = prot->ip;       if (basic_auth) {    base_uri->user = (basic_auth/":")[0];    base_uri->password = (basic_auth/":")[1..] * ":";    }       report_debug("Webdav testsuite: Base URI: %s\n", (string)base_uri);