Il giorno 03/nov/06, alle ore 10:11, Dirk L=FCsebrink ha scritto:
while i easily get a webdav server up an running with
gem install webrick-webdav
and
require 'webrick'
require 'webrick/httpservlet/webdavhandler'
server =3D WEBrick::HTTPServer.new(context.values)
server.mount("/webdav", WEBrick::HTTPServlet::WebDAVHandler, =20
Dir.pwd)
...
and can mount and read the files, i still can't actually modify any of
the exported/mounted webdav files.
before i start diving into real problem tracking i would like to =20
ask if
someone of you had the same problems? i export/mount on mac os x. =20
might
this be a mac or a webrick-webdav problem? any tips welcomed,
have fun
dirk
Exactly, that's a Mac OS X issue: webrick-webdav supports protocol =20
version 1.0, while Mac OS X wants the server to support v2.0 in order =20=
to let you write on that share.
I had the same problem as yours, but I couldn't find enough =20
documentation anywhere (about webrick-webdav or about the version =20
required by OS X) so I started reading webrick-webdav sources and =20
comparing the traffic dump with an apache webdav module and I found =20
out this version issue.
Actually I think that the only difference between 1.0 and 2.0 servers =20=
is that the latter ones support LOCK methods, which allow to lock =20
files (exclusive or shared locks). I didn't need this, so I just =20
inherited from WebDAVHandler:
module WEBrick
module HTTPServlet
class WebDAVHandlerVersion2 < WebDAVHandler
def d

PTIONS(req, res)
super
res["DAV"] =3D "1,2"
end
end
end
end
So I started using WebDAVHandlerVersion2 instead of WebDAVHandler. In =20=
fact, on the source code of WebDAVHandler there is a commented out =20
'res["DAV"] =3D "1,2"' line...
It worked, I'm quite sure I could write to that share, but right now =20
it seems like it doesn't work very well with OS X: I get strange =20
errors when writing into a file or creating a new one.
Some time ago I wrote a page about my experiments with WebDAV, since =20
I couldn't find enough documentation:
http://gmarrone.objectblues.net/=20=
cgi-bin/wiki/WebDAV_-_Linux_server%2c_Mac_OS_X_client .
I summed up almost everything in this mail, but maybe you can find =20
something useful over there

It isn't up to date, though: I don't describe the errors I get now =20
with that solution.
Please let me know if your Mac OS X is able to write without any =20
error on that modified version of webrick-webdav
