From b35122f7a6ad42756c35bb60ba1f06c3dcd45c77 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 21 Oct 2013 15:46:31 -0700 Subject: add sabre (1.8.x) via composer in the !@#$ place it wants to be --- .../dav/lib/Sabre/DAV/Browser/MapGetToPropFind.php | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 vendor/sabre/dav/lib/Sabre/DAV/Browser/MapGetToPropFind.php (limited to 'vendor/sabre/dav/lib/Sabre/DAV/Browser/MapGetToPropFind.php') diff --git a/vendor/sabre/dav/lib/Sabre/DAV/Browser/MapGetToPropFind.php b/vendor/sabre/dav/lib/Sabre/DAV/Browser/MapGetToPropFind.php new file mode 100644 index 000000000..a429e8f88 --- /dev/null +++ b/vendor/sabre/dav/lib/Sabre/DAV/Browser/MapGetToPropFind.php @@ -0,0 +1,57 @@ +server = $server; + $this->server->subscribeEvent('beforeMethod',array($this,'httpGetInterceptor')); + } + + /** + * This method intercepts GET requests to non-files, and changes it into an HTTP PROPFIND request + * + * @param string $method + * @param string $uri + * @return bool + */ + public function httpGetInterceptor($method, $uri) { + + if ($method!='GET') return true; + + $node = $this->server->tree->getNodeForPath($uri); + if ($node instanceof DAV\IFile) return; + + $this->server->invokeMethod('PROPFIND',$uri); + return false; + + } + +} -- cgit v1.2.3