cvs: pear /HTTP_WebDAV_Server Server.php
| From: | Hartmut Holzgraefe | Date: | Wed, 01 Mar 2006 02:11:15 +0000 |
| Subject: | cvs: pear /HTTP_WebDAV_Server Server.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-38762@lists.php.net to get a copy of this message | ||
hholzgra Wed Mar 1 02:11:15 2006 UTC
Modified files:
/pear/HTTP_WebDAV_Server Server.php
Log:
code execution order changed as suggested in PEAR bug #6666
http://cvs.php.net/viewcvs.cgi/pear/HTTP_WebDAV_Server/Server.php?r1=1.37&r2=1.38&diff_format=u
Index: pear/HTTP_WebDAV_Server/Server.php
diff -u pear/HTTP_WebDAV_Server/Server.php:1.37 pear/HTTP_WebDAV_Server/Server.php:1.38
--- pear/HTTP_WebDAV_Server/Server.php:1.37 Wed Mar 1 02:07:27 2006
+++ pear/HTTP_WebDAV_Server/Server.php Wed Mar 1 02:11:15 2006
@@ -17,7 +17,7 @@
// | Christian Stocker <chregu@bitflux.ch> |
// +----------------------------------------------------------------------+
//
-// $Id: Server.php,v 1.37 2006/03/01 02:07:27 hholzgra Exp $
+// $Id: Server.php,v 1.38 2006/03/01 02:11:15 hholzgra Exp $
//
require_once "HTTP/WebDAV/Tools/_parse_propfind.php";
require_once "HTTP/WebDAV/Tools/_parse_proppatch.php";
@@ -131,6 +131,26 @@
$this->base_uri = $uri;
$this->uri = $uri . $_SERVER["PATH_INFO"];
+ // set path
+ $this->path = $this->_urldecode($_SERVER["PATH_INFO"]);
+ if (!strlen($this->path)) {
+ if ($_SERVER["REQUEST_METHOD"] == "GET") {
+ // redirect clients that try to GET a collection
+ // WebDAV clients should never try this while
+ // regular HTTP clients might ...
+ header("Location: ".$this->base_uri."/");
+ exit;
+ } else {
+ // if a WebDAV client didn't give a path we just assume '/'
+ $this->path = "/";
+ }
+ }
+
+ if(ini_get("magic_quotes_gpc")) {
+ $this->path = stripslashes($this->path);
+ }
+
+
// identify ourselves
if (empty($this->dav_powered_by)) {
header("X-Dav-Powered-By: PHP class: ".get_class($this));
@@ -159,26 +179,6 @@
return;
}
- // set path
- $this->path = $this->_urldecode($_SERVER["PATH_INFO"]);
- if (!strlen($this->path)) {
- if ($_SERVER["REQUEST_METHOD"] == "GET") {
- // redirect clients that try to GET a collection
- // WebDAV clients should never try this while
- // regular HTTP clients might ...
- header("Location: ".$this->base_uri."/");
- exit;
- } else {
- // if a WebDAV client didn't give a path we just assume '/'
- $this->path = "/";
- }
- }
-
- if(ini_get("magic_quotes_gpc")) {
- $this->path = stripslashes($this->path);
- }
-
-
// detect requested method names
$method = strtolower($_SERVER["REQUEST_METHOD"]);
$wrapper = "http_".$method;