Roxen.git / server / etc / test / modules / TEST.pmod / http.pmod / WebDAV.pmod / TestBase.pike

version» Context lines:

Roxen.git/server/etc/test/modules/TEST.pmod/http.pmod/WebDAV.pmod/TestBase.pike:85:    if (index == 1) {    return headers;    }    if (index == 2) {    return data;    }    }    return ::`[](index);    }    +  protected string _sprintf(int c) +  { +  return sprintf("%O(%O, %O, %O)", this_program, status, headers, data);    } -  + }      protected WebDAVResponse webdav_request(string method,    string path,    mapping(string:string)|void extra_headers,    string|void data)   {    mapping(string:string) headers = base_headers + ([]);       if (extra_headers) {    headers += extra_headers;
Roxen.git/server/etc/test/modules/TEST.pmod/http.pmod/WebDAV.pmod/TestBase.pike:139:    }    }    if (sizeof(locks)) {    headers->if = "(<" + (indices(locks) * ">), (<") + ">)";    }    }    if (has_prefix(path, "/")) {    path = path[1..];    }    -  Standards.URI url = Standards.URI(Protocols.HTTP.percent_encode(path), base_uri); +  path = map((path/"/"), Protocols.HTTP.percent_encode) * "/"; +  Standards.URI url = Standards.URI(path, base_uri);    con = Protocols.HTTP.do_method(method, url, UNDEFINED, headers, con, data);       report_debug("Webdav: %s %O (url: %O) ==> code: %d\n",    method, path, url, con?con->status:600);       if (!con) {    return WebDAVResponse(600, ([]), "" );    }       return WebDAVResponse(con->status, con->headers, con->data());