]> git.mxchange.org Git - friendica.git/commitdiff
remove special case for /.well-known/host-meta and add module for /.well-known
authorFabrixxm <fabrix.xm@gmail.com>
Fri, 27 Jul 2012 12:58:27 +0000 (08:58 -0400)
committerFabrixxm <fabrix.xm@gmail.com>
Fri, 27 Jul 2012 12:58:27 +0000 (08:58 -0400)
boot.php
mod/_well_known.php [new file with mode: 0644]

index 6a894445ba9ae5aed548b8fa8dcaf9d15f6bb03e..0ef0977341bffcd79957fbd84dbf3b21e871113a 100644 (file)
--- 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 (file)
index 0000000..155810d
--- /dev/null
@@ -0,0 +1,14 @@
+<?php\r
+require_once("hostxrd.php");\r
+\r
+function _well_known_init(&$a){\r
+    if ($a->argc > 1) {\r
+        switch($a->argv[1]) {\r
+            case "host-meta":\r
+                hostxrd_init($a);\r
+                break;\r
+        }\r
+    }\r
+    http_status_exit(404);\r
+    killme();\r
+}
\ No newline at end of file