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

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Mon May 29 15:14:01 EDT 2006

The server doesn't know what to do with a PROPFIND request.

After it goes through the sequence of dispatchers, it bottoms out. Perhaps
this is not the best way of handling the error.

You can write your WebDAV as either
a) A servlet


b) A dispatcher

Writing a servlet just requires changing the line you already found in
request-parsing. I will look into making this easier.

Writing a dispatcher requires you to understand some undocumented features.
But I can help you with this.

I recommend prototyping in a servlet then turning it into a dispatcher or
using a special continuation manager.

On 5/26/06, Vincent Kraeutler <vincent at igc.phys.chem.ethz.ch> wrote:
> 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
> 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.
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Jay McCarthy <jay at cs.brown.edu>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20060529/117dd920/attachment.html>

Posted on the users mailing list.