[plt-scheme] Notable bug-fix in uri-codec.ss in the net collection

From: Neil W. Van Dyke (neil at neilvandyke.org)
Date: Thu Aug 26 16:05:08 EDT 2004

Mike Burns <netgeek at speakeasy.net> writes at 15:19 26-Aug-2004 -0400:
> It is not possible to create a URL with ampersands (`&') in it and
> then use that URL in a XML page created with the xml collection; the

By the way, I think that's not the fault of the PLT "xml" collection:
the combination of HtmlPrag and "uri.scm" pointed out what I think is a
nasty little linguistic ambiguity introduced by the combination of HTML
and XHTML specs and how browsers traditionally parsed URLs in element
attributes.  Some comments in "uri.scm" allude to this.

>  http://www.example.com/search?q=the+query;lang=en

I'll probably add this parsing of semicolons to "uri.scm" too, although
that'll probably break some legacy HTTP URLs.

Regarding formatting URI attribute-value query lists, I'm not
immediately sure how to best handle that without complicating the API.
";" as a separator won't work with all HTTP request processors.  And a
consistent use of ";" and "&" within a set of URIs can be important,
since "uri.scm" does some things to normalize URIs as database keys for
Web crawlers.  Please email me any suggestions/preferences if you care
about this.


Posted on the users mailing list.