Roxen.git / server / base_server / configuration.pike

version» Context lines:

Roxen.git/server/base_server/configuration.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2001, Roxen IS.   //      // @appears Configuration   //! A site's main configuration    - constant cvs_version = "$Id: configuration.pike,v 1.536 2003/06/16 15:17:12 grubba Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.537 2003/08/13 15:25:55 grubba Exp $";   #include <module.h>   #include <module_constants.h>   #include <roxen.h>   #include <request_trace.h>   #include <timers.h>      #define CATCH(P,X) do{mixed e;if(e=catch{X;})report_error("While "+P+"\n"+describe_backtrace(e));}while(0)      // --- Locale defines ---   //<locale-token project="roxen_start"> LOC_S </locale-token>
Roxen.git/server/base_server/configuration.pike:1760:    // If a server receives ill-formed XML in a request it MUST reject    // the entire request with a 400 (Bad Request).    TRACE_LEAVE("Malformed XML.");    return Roxen.http_low_answer(400, "Malformed XML data.");    }    if (!(<"PROPFIND", "PROPPATCH">)[id->method]) {    TRACE_LEAVE("Not implemented.");    return Roxen.http_low_answer(501, "Not implemented.");    }    int depth = ([ "0":0, "1":1, "infinity":0x7fffffff, 0:0x7fffffff ]) -  [String.trim_whites(id->request_headers->depth)]; +  [id->request_headers->depth && +  String.trim_whites(id->request_headers->depth)];    if (zero_type(depth)) {    TRACE_LEAVE(sprintf("Bad depth header: %O.",    id->request_headers->depth));    return Roxen.http_low_answer(400, "Unsupported depth.");    }       // Function to call for matching location modules.    //    // Arguments:    // string path
Roxen.git/server/base_server/configuration.pike:1872:    case "DAV:remove":    Parser.XML.Tree.Node prop =    cmd->get_first_element("DAV:prop", 1);    if (!prop) {    TRACE_LEAVE("Bad DAV request.");    return Roxen.http_low_answer(400, "Bad DAV request (no properties specified).");    }    if (cmd->get_full_name() == "DAV:set") {    instructions += map(prop->get_children(), PatchPropertySetCmd);    } else { +  // FIXME: Should we verify that the properties are empty?    instructions += map(prop->get_children()->get_full_name(),    PatchPropertyRemoveCmd);    }    break;    default:    // FIXME: Should we complain here?    break;    }    }    if (!sizeof(instructions)) {