[plt-scheme] Problem fetching a URL

From: Eli Barzilay (eli at barzilay.org)
Date: Wed Oct 11 17:38:45 EDT 2006

On Oct 11, Robby Findler wrote:
> The url is actually parsed and unparsed in the code you sent and,
> the way that library is currently designed, the delimiter isn't
> recorded in the parsed form.
> Perhaps it should be, but it seems hard to be sure.

Maybe this will make sense?  -- Add another slot to the url struct
that holds the default separator.  Make this slot be #f by default
which will mean "consult the parameter value".  Then, the code that
parses urls can try to do so using "[&;]" as a pattern and:
* If neither appears, leave the slot #f
* If all occurrences are the same, use it for the slot value
* Otherwise throw an error

This will make most string-specified url problems go away, and it will
also be better than a global parameter that can be a problem with code
that interfaces two servers with different separators.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!

Posted on the users mailing list.