[racket] web server: how to read the current url?

From: Janos Tobias Locsei (jtlocsei at cantab.net)
Date: Wed Feb 5 11:26:55 EST 2014

Is there a way for a function in the web server to find out the current url?

I'm using stateful servlets and I'd like to redirect to the start page of
my app if the continuation expires, using something along the lines of

(parameterize
  ([current-servlet-continuation-expiration-handler
    <send response that redirects to start of app>])
  (send/suspend/dispatch ...))

I was hoping that I could write the bit inside the <> as a general purpose
function for all my apps, so that e.g. it would see that the current url is

http://mydomain.com/myapp;(("k" . "(8 2 17927109)"))

and then just strip back the url and redirect to

http://mydomain.com/myapp

Is that possible?

Tobias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140205/f5e5ef30/attachment.html>

Posted on the users mailing list.