From a77fdfa6aa5d237915036c2dc140a9c1a1ea2886 Mon Sep 17 00:00:00 2001 From: Fabrixxm Date: Fri, 27 Jul 2012 08:58:27 -0400 Subject: [PATCH] remove special case for /.well-known/host-meta and add module for /.well-known --- boot.php | 11 +---------- mod/_well_known.php | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 mod/_well_known.php diff --git a/boot.php b/boot.php index 6a894445ba..0ef0977341 100644 --- a/boot.php +++ b/boot.php @@ -458,6 +458,7 @@ if(! class_exists('App')) { $this->argc = count($this->argv); if((array_key_exists('0',$this->argv)) && strlen($this->argv[0])) { $this->module = str_replace(".", "_", $this->argv[0]); + $this->module = str_replace("-", "_", $this->module); } else { $this->argc = 1; @@ -465,16 +466,6 @@ if(! class_exists('App')) { $this->module = 'home'; } - /** - * Special handling for the webfinger/lrdd host XRD file - */ - - if($this->cmd === '.well-known/host-meta') { - $this->argc = 1; - $this->argv = array('hostxrd'); - $this->module = 'hostxrd'; - } - /** * See if there is any page number information, and initialise * pagination diff --git a/mod/_well_known.php b/mod/_well_known.php new file mode 100644 index 0000000000..155810df36 --- /dev/null +++ b/mod/_well_known.php @@ -0,0 +1,14 @@ +argc > 1) { + switch($a->argv[1]) { + case "host-meta": + hostxrd_init($a); + break; + } + } + http_status_exit(404); + killme(); +} \ No newline at end of file