about processes and engines

webdavhandler.rb on jruby 1.1[.1]

There is this hidden gem in Ruby land, the webrick webdav handler.

I’ve been using it to power some webdav accesses to an application here. When the time arrived to upgrade from JRuby 1.1 “pre from last fall” to JRuby 1.1[.1], this webdav handler broke.

jmettraux@sonora:~/tmp$ ~/jruby-1.1.1/bin/jruby dav.rb
[2008-04-24 10:09:24] INFO  WEBrick 1.3.1
[2008-04-24 10:09:24] INFO  ruby 1.8.6 (2008-04-22) [java]
[2008-04-24 10:09:24] INFO  WEBrick::HTTPServer#start: pid=3998 port=10080
[2008-04-24 10:09:37] ERROR ArgumentError: wrong number of arguments (4 for 3)
        /home/jmettraux/tmp/./webdavhandler.rb:135:in `chk_utf8'
        /home/jmettraux/tmp/./webdavhandler.rb:135:in `detect'

Two small changes to webdavhandler.rb fixed this issue and a subsequent issue.

The updated webdavhandler.rb is available.

Written by John Mettraux

April 24, 2008 at 1:46 am

Posted in jruby, ruby

%d bloggers like this: