Home » HTTP » HTTP_WebDAV_Server » Bug #7810
Customizing $uri and $base_uri
Details
| Request #7810 | Customizing $uri and $base_uri |
|---|---|
| Submitted | 2006-06-05 08:07 UTC |
| From | fedphp at gmail dot com |
| Assigned | hholzgra |
| Status | Closed |
| Package | HTTP_WebDAV_Server |
| PHP Version | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2006-06-05 08:07 UTC] fedphp at gmail dot com
Description:
------------
HTTP_WebDAV_Server relies on SCRIPT_NAME and PATH_INFO to
figure out the requested url.
This makes it somewhat complicated to integrate the server
in applications that handles urls in a different way.
In my case I used the server in an application where I use
mod_rewrite to change:
/myapp/webdav/
into:
/myscript.php?url=/myapp/webdav/
and I had some funny results with the Server because this
way PATH_INFO is always empty and SCRIPT_NAME never appears
on my URL.
To work around the problem I had to override ServeRequest()
to set up $this->uri and $this->base_uri in my own way, and
http_PROPFIND() to pass my own path to $this->_mergePatches
() instead of SCRIPT_NAME. No problem with overriding but I
had to copy some large blocks of code only to change a
couple of lines.
It would be easier if, instead of relying on SCRIPT_NAME
there was a way to provide a custom "base path", maybe in
the form of a property, and if ServeRequest() didn't
unconditionally overwrite nonempty $uri and $base_uri
properties.