Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.0RC8

Bug #12500 Undefined variable: host in HTTP/WebDAV/Server.php line 1470
Submitted: 2007-11-21 18:31 UTC
From: schmidt Assigned: hholzgra
Status: Closed Package: HTTP_WebDAV_Server (version 1.0.0RC4)
PHP Version: Irrelevant OS: Linux
Roadmaps: 1.0    
Subscription  


 [2007-11-21 18:31 UTC] schmidt (Christian Schmidt)
Description: ------------ HTTP_WebDAV_Server::_copymove() contains the following line: $http_host = $host; but $host is not defined in that scope.

Comments

 [2007-11-27 12:13 UTC] hholzgra (Hartmut Holzgraefe)
$host is populated by the previous call to extract(parse_url($this->_SERVER["HTTP_DESTINATION"])); so it looks more as if an invalid Destination: header was passed in the COPY or MOVE command Can you add a trace of the HTTP request traffic for the failing request to this bug report?
 [2007-11-27 14:19 UTC] schmidt (Christian Schmidt)
Sorry, I missed the extract(). That was tricky :-) The Destination header appears to be a URL relative to the site root. I don't know whether that is allowed. I don't have a complete trace of the HTTP request, but here is an excerpt from $_SERVER: [HTTP_DESTINATION] => /webdav/foo/bar/images [HTTP_OVERWRITE] => F [HTTP_HOST] => webdav.example.org [HTTP_USER_AGENT] => WebDrive 7.34.1801 DAV [HTTP_TRANSLATE] => f [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => MOVE [QUERY_STRING] => [REQUEST_URI] => /webdav/foo/bar/New%20Folder [SCRIPT_NAME] => /webdav
 [2007-11-30 12:02 UTC] hholzgra (Hartmut Holzgraefe)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. This should be fixed in CVS now, if just a path is given instead of a URL the http request host is used as default