Home » HTTP » HTTP_WebDAV_Server » Bug #9367
Example Fileserver shows wrong uri for folders
Details
| Submitted | 2006-11-17 21:43 UTC |
|---|---|
| From | jeroen dot van dot wissen at 31f dot nl |
| Assigned | hholzgra |
| Status | Closed |
| Package | HTTP_WebDAV_Server |
| PHP Version | 5.2.0 |
| OS | Linux |
| Roadmaps | 1.0 |
Comments
[2006-11-17 21:43 UTC] jeroen dot van dot wissen at 31f dot nl
Description:
------------
Then opening the example Fileserver that comes with the
HTTP_WebDav_Server package with following code.
<?php
require("Filesystem.php");
$server = new HTTP_WebDAV_Server_Filesystem();
$server->ServeRequest($_SERVER["DOCUMENT_ROOT"]);
?>
The folders shown on the page have wrong uri set.
http://array[http_host]array[script_name]/webdav/
for a folder named webdav.
Line 147 in HTTP/WebDav/Server.php of the Pear package says:
$uri.= "//$this->_SERVER[HTTP_HOST]$this->_SERVER
[SCRIPT_NAME]";
i changed it into:
$uri.= "//".$this->_SERVER[HTTP_HOST].$this->_SERVER
[SCRIPT_NAME];
and it works for me.
[2006-11-17 21:45 UTC] jeroen dot van dot wissen at 31f dot nl
It was PHP 5.2.0 and not PHP 5.2.0 RC4 ( PHP 5.2.0 wasn't in
the pulldown ;) )