[plt-scheme] Second teeny little net/url bug

From: Carl Eastlund (carl.eastlund at gmail.com)
Date: Wed Sep 30 19:02:26 EDT 2009

Thanks for the reports, Synx.  I encourage you to file them as bug
reports at bugs.plt-scheme.org (or using the Help menu in DrScheme);
that way we implementers get automatic notification, reminders, audit
trails, etc., and as the reporter you get updates as we make progress
on fixing these bugs.

Carl Eastlund

On Wed, Sep 30, 2009 at 6:59 PM, Synx <plt at synx.us.to> wrote:
>
> Oh look I found two bugs in one day! :( I'm so lucky.
>
> (url->string (string->url
> "http://some.server.com/path/with%3Acolons/in%3Ait/and%25spaces"))
> => "http://some.server.com/path/with:colons/in:it/and%25spaces"
>
> I tried double encoding something thus:
>
> (url->string
>  (string->url
>    (uri-encode (uri-encode "not:a:schema/but a relative/url"))))
>
> => "not%253Aa%253Aschema%252Fbut%2520a%2520relative%252Furl"
>
> ...which is correct.
>
> So it handles space/%25 just fine, but colon gets encoded, decoded, but
> never encoded again when it ought to be. That makes it impossible to
> make a relative url whose path contains colons, as (url->string) returns
> unescaped colons, which are treated as delimiters for the schema.


Posted on the users mailing list.