"Using Saved Location: foo"

John Arbash Meinel john at arbash-meinel.com
Thu Apr 27 21:11:31 BST 2006


Jan Hudec wrote:
> On Thu, Apr 27, 2006 at 14:14:48 -0500, John Arbash Meinel wrote:
>> Jan Hudec wrote:
>> ...
>>> I can't quickly find the right place to look into right now, but I think the
>>> list of characters to never decode would be:
>>> /?,;#&%+
>>> Note, that those characters are not auto-encoded either, so if they are
>>> encoded, they were specified as such (+ because it means ' ' in
>>> query-strings, so it may be significant whether it is encoded).
>>>
>> Looking through urllib.py they reference RFC2396, and then use:
>>     reserved    = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
>>                   "$" | ","
>>
>> But different ones are only reserved at different times.
> 
> I think we could just treat them all the same. Except for local paths (where
> everything is decoded) these would never be encoded when URL is received and
> never decoded when it is printed.
> 
> Also this list does not include the #, that is forbidden in URL and is used
> to separate the fragment in URL-reference. We need to treat that as reserved
> as well.
> 
> I wonder what '$' is used for (it's reserved in query string, but the RFC
> does not give any rules for that), but let's be consistent with the spec.
> 

Well, it does happen the bzrlib will encode some of those characters.
For example if your file has a ',' in it, it will be escaped.
But I do think it is good to try and display safe urls (ones that you
can then paste into a browser). So I'm okay with leaving them escaped.

John
=:->


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060427/38d82aba/attachment.pgp 


More information about the bazaar mailing list