Is wevdav supported on rewritten URLs ?
Added by petchema over 15 years ago
WebDAV is enabled globally, /rest/files/... URLs are rewritten as /data/... URLs
In this case, DAV seems to work on /data/ URLs, but not on /rest/files/ URLs.
Is that normal? I thought rewriting was done very early in request handling, so I expected both to work...
configuration:
webdav.activate = "enable"
webdav.is-readonly = "disable"
url.rewrite-once = (
"^/rest/file/(.*)$" => "/data/$1",
)
$ cadaver http://server/data/0/1/2/3/4/
dav:/data/0/1/2/3/4/> ls
Listing collection `/data/0/1/2/3/4/': succeeded.
1111 5 déc 17 15:23
2222 5 déc 17 15:35
5678 5 déc 17 14:37
9999 5 déc 17 15:19
(and so on, DAV operations work just fine with those URLs)
$ wget http://server/rest/file/0/1/2/3/4/1111
--2008-12-17 17:18:54-- http://server/rest/file/0/1/2/3/4/1111
Resolving server... 192.168.1.80
Connecting to server|192.168.1.80|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5 [application/octet-stream]
Saving to: `1111'
100%[======================================>] 5 --.-K/s in 0s
2008-12-17 17:18:54 (782 KB/s) - `1111' saved [5/5]
(redirection works fine with GETs)
$ cadaver http://server/rest/file/0/1/2/3/4/
Could not access /rest/file/0/1/2/3/4/ (not WebDAV-enabled?):
404 Not Found
Connection to `server' closed.
[...]
Best regards,
Pierre.
Replies (7)
RE: Is webdav supported on rewritten URLs ? - Added by petchema over 15 years ago
Nobody can confirm?
Without rewritting, URLs have to match filesystem layout, this is sometimes annoying...
Best regards,
Pierre.
RE: Is wevdav supported on rewritten URLs ? - Added by Olaf-van-der-Spek over 15 years ago
Did you load the rewrite module before the webdav module?
RE: Is wevdav supported on rewritten URLs ? - Added by petchema over 15 years ago
I used server.modules from Debian default configuration file, just uncommenting mod_rewrite and mod_webdav modules:
server.modules = ("mod_access",
"mod_alias",
"mod_accesslog",
"mod_rewrite",
- "mod_redirect",
- "mod_status",
- "mod_evhost",
- "mod_compress",
- "mod_usertrack",
- "mod_rrdtool",
"mod_webdav", - "mod_expire",
- "mod_flv_streaming",
- "mod_evasive"
)
From this, I understand that the rewrite module should be loaded before the webdav module?
Best regards,
Pierre.
RE: Is wevdav supported on rewritten URLs ? - Added by Olaf-van-der-Spek over 15 years ago
That might be a good thing to try.
RE: Is wevdav supported on rewritten URLs ? - Added by petchema over 15 years ago
Well, maybe I wasn't clear, above server.modules list is the configuration I'm currently using.
So if modules are loaded in this order, first-to-last, mod_rewrite was loaded before mod_webdav during the tests.
Best regards,
Pierre.
RE: Is wevdav supported on rewritten URLs ? - Added by Olaf-van-der-Spek over 15 years ago
Ah, I didn't really understand the numbers. I doubt reversing the order would work.
RE: Is wevdav supported on rewritten URLs ? - Added by petchema over 15 years ago
Numbers come from the interpretation of sharp characters at the beginning of lines as list items by this site...
Sorry about that, I didn't notice it immediately in the preview, or I would have added "pre" tags around file snippet...
So, it really looks like a lighttpd 1.4 shortcoming ? Does 1.5 fix it ?
What's the status of 1.5 those days ?
It seems to have lots of features I'm interested in, but the lack of stable release for such a long time is a bit scary...
Best regards,
Pierre.