Roxen.git
/
server
/
base_server
/
module.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/base_server/module.pike:1:
// This file is part of Roxen WebServer. // Copyright © 1996 - 2004, Roxen IS.
-
// $Id: module.pike,v 1.
233
2008/12/11
15
:
32
:
28
jonasw Exp $
+
// $Id: module.pike,v 1.
234
2008/12/11
17
:
17
:
43
jonasw Exp $
#include <module_constants.h> #include <module.h> #include <request_trace.h> constant __pragma_save_parent__ = 1; // Tell Pike.count_memory this is global. constant pike_cycle_depth = 0;
Roxen.git/server/base_server/module.pike:269:
array(string) location_urls() //! Returns an array of all locations where the module is mounted. { string loc = query_location(); if (!loc) return ({}); if(!_my_configuration) error("Please do not call this function from create()!\n"); array(string) urls = copy_value(_my_configuration->query("URLs")); string hostname;
-
if (string world_url = _my_configuration->query ("MyWorldLocation")) {
+
if (string world_url = _my_configuration->query ("MyWorldLocation"))
+
if (sizeof(world_url))
{
Standards.URI uri = Standards.URI(world_url); hostname = uri->host; } if (!hostname) hostname = gethostname(); for (int i = 0; i < sizeof (urls); i++) { urls[i] = (urls[i]/"#")[0]; if (sizeof (urls[i]/"*") == 2) urls[i] = replace(urls[i], "*", hostname); }
Roxen.git/server/base_server/module.pike:300:
return "({ " + (map(a, lambda(object o) { return sprintf("%O", o); })*", ") + " })"; }; string loc = query_location(); if(!loc) return 0; if(!_my_configuration) error("Please do not call this function from create()!\n"); string hostname; string world_url = _my_configuration->query("MyWorldLocation");
-
if (world_url) {
+
if (world_url
&& sizeof(world_url
)
)
{
Standards.URI uri = Standards.URI(world_url); hostname = uri->host; } if(!hostname) hostname = gethostname(); #ifdef LOCATION_URL_DEBUG werror(" Hostname: %O\n", hostname); #endif Standards.URI candidate_uri; array(string) urls =