chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] [Q] uri-common has problem with UTF-8 uri.


From: Peter Bex
Subject: Re: [Chicken-users] [Q] uri-common has problem with UTF-8 uri.
Date: Tue, 15 Jan 2013 16:59:10 +0100
User-agent: Mutt/1.4.2.3i

On Wed, Jan 16, 2013 at 12:39:16AM +0900, Alex Shinn wrote:
> The internal representation is either decoded, or it is encoded.
> Either can be made to work.
> 
> In this case, the decoded uri-common representation of the former is:
> 
>   ((bool-expr . "x&y=1"))
> 
> and the decoded representation of the latter is:
> 
>   ((bool-expr . "x") (y . "1"))
> 
> just as you say, so this is how they are stored in the URI object.
> 
> In uri-generic, both get parsed to:
> 
>   ((bool-expr . "x&y=1"))

This cannot work because uri-common is re-using uri-generic's parser.
Also, uri-generic doesn't do alist-decoding at all, because form-encoding
is a HTML affair and has nothing to do with HTTP or URI standards.

> Therefore, if you intended the raw URI data to include a "%",
> then the correct representation (for either common or generic)
> would have been:
> 
>   
> http://calc.example.com?bool-expr=x%2526y%253D<http://calc.example.com/?bool-expr=x%26y%3D>
> 
> So assuming & is _not_ special to the query (as is the case
> with uri-generic), escaping & with %25 or not produces the
> same result.

If you can make it work for both libraries, feel free to do so, but
my energy to work on web stuff is very very low at the moment.

Cheers,
Peter
-- 
http://sjamaan.ath.cx



reply via email to

[Prev in Thread] Current Thread [Next in Thread]