aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-09-02 21:39:45 -0700
committerfriendica <info@friendica.com>2012-09-02 21:39:45 -0700
commitfb35742aab9b08ddee06fb576231a3248e77e185 (patch)
tree1021b7b4187a2690be03aeae87a42d69c1c6547e
parentfd5dfc95f6c41aa2253112d8758253e4856232c8 (diff)
downloadvolse-hubzilla-fb35742aab9b08ddee06fb576231a3248e77e185.tar.gz
volse-hubzilla-fb35742aab9b08ddee06fb576231a3248e77e185.tar.bz2
volse-hubzilla-fb35742aab9b08ddee06fb576231a3248e77e185.zip
add fabrixxm's recent changes to how ".well_known" urls work
-rw-r--r--boot.php16
-rw-r--r--mod/_well_known.php24
2 files changed, 24 insertions, 16 deletions
diff --git a/boot.php b/boot.php
index 1e42228c4..d9d90bcd4 100644
--- a/boot.php
+++ b/boot.php
@@ -516,22 +516,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';
- }
-
- if(strstr($this->cmd,'.well-known/zot-guid')) {
- $this->argc -= 1;
- array_shift($this->argv);
- $this->argv[0] = 'zfinger';
- $this->module = 'zfinger';
- }
/**
* See if there is any page number information, and initialise
diff --git a/mod/_well_known.php b/mod/_well_known.php
new file mode 100644
index 000000000..ac4eb6076
--- /dev/null
+++ b/mod/_well_known.php
@@ -0,0 +1,24 @@
+<?php
+
+function _well_known_init(&$a){
+
+ if(argc() > 1) {
+ switch(argv(1)) {
+ case "host-meta":
+ require_once('mod/hostxrd.php');
+ hostxrd_init($a);
+ break;
+
+ case 'zot-guid':
+ $a->argc -= 1;
+ array_shift($a->argv);
+ $a->argv[0] = 'zfinger';
+ require_once('mod/zfinger.php');
+ zfinger_init($a);
+ break;
+
+ }
+ }
+
+ http_status_exit(404);
+} \ No newline at end of file