[plt-scheme] web-server eats my exceptions? -- newbie question

From: Vincent Kraeutler (vincent at igc.phys.chem.ethz.ch)
Date: Fri May 26 10:17:54 EDT 2006

Hi,

I am currently dabbling with WebDAV and use this as an excuse
to try to get into lisp in general and DrScheme in particular.

I've started the web-server from within DrScheme like so

(require (lib "web-server.ss" "web-server"))
(require (lib "configuration.ss" "web-server"))

(serve 
 (load-configuration 
  (string->path "/Applications/PLT Scheme v301/collects/web-server/configuration-table"
                )))

and worked my way through a bunch of example servlets,
and I have to say I'm really happy with how my newbie-mistakes
are nicely reported in the interactions window, so I can fix
them and move on. Congrats to those involved!

Moving away from basic servlets, I seem to have hit a bit of a 
wall. I'm trying to teach the web-server to react in some way to 
WebDAV requests such as PROPFIND etc.

Initially, when interactively supplying 
PROPFIND / HTTP/1.1
or
PROPFIND /servlets/test.ss HTTP/1.1
via telnet, it would immediately close the connection. This I quickly
found out to be due to 

  (define METHOD:REGEXP
    (byte-regexp #"^(GET|HEAD|POST|PUT|DELETE|TRACE) (.+) HTTP/([0-9]+)\\.([0-9]+)$"))

in web-server/request-parsing.ss . Changing that to

  (define METHOD:REGEXP
    (byte-regexp #"^(GET|HEAD|POST|PUT|DELETE|TRACE|PROPFIND) (.+) HTTP/([0-9]+)\\.([0-9]+)$"))

it now seems to be doing something for a few seconds, followed by 
losing the connection. I was naively hoping to get a nice long error 
message taking me a step further, but neither DrScheme nor the log 
file report anything. Is it just running in circles until it hits a
timeout? Trying to backtrack the code, I have come as far as read-request 
(i.e. not very far ;-) ), at which point I'm losing the connection ;-).

Any useful pointers or ideas to make the system more talkative would be very 
much appreciated.  Also, before I spend too much time on this -- any 
judgement by those in the know on whether trying to marry the PLT 
web-server with WebDAV is utter stupidity would also be very welcome.

Kind regards,
v.


Posted on the users mailing list.