PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTTP » HTTP_WebDAV_Server » Bug #9367

Example Fileserver shows wrong uri for folders

Details

Submitted2006-11-17 21:43 UTC
Fromjeroen dot van dot wissen at 31f dot nl
Assignedhholzgra
StatusClosed
PackageHTTP_WebDAV_Server
PHP Version5.2.0
OSLinux
Roadmaps1.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 ;) )