[racket] Web-Server: dispatch rules and urls generated with embed/url

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Wed Nov 28 18:54:46 EST 2012

embed/url uses the current URL as the base, because a continuation
represents a step in the large computation that that URL represents.
On a technical level, it needs to do this to correctly handle servers
that serve many servlets each with different URLs. It uses the base
url to get to the continuation table, and then looks up the
continuation in the corresponding table.

Jay

On Wed, Nov 28, 2012 at 4:13 PM, Helmut Dobretzberger
<h.dobretzberger at gmx.at> wrote:
> Hey,
>
> I have a problem with the behaviour of embed/url in combination of using
> pretty urls:
>
> when the current page is http://localhost:8080, and I generate a URL with
> embed/url, the result is something like "/;((...)). That's fine.
> If I have pretty url with dispatch, like
> http://localhost:8080/search/foobar, and I generate at this page a url, then
> the result is something like "/search/foobar;((...))
>
> Why is the "search/foobar" - Part included in the continuation-url? That's
> really ugly, because if you click on other generated links, like
> delete-search-entry or so, it will start with
> /search/foobar;((....))
>
> It is easy to avoid this, e.g. using string-split on the result of
> embed/url, but I am interested if there is a reason for that behaviour of
> embed/url.
>
> --
> Helmut
>
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users



-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93

Posted on the users mailing list.