At present, when a freenet URI is parsed, we run a url decode on each
human readable part, and when it is unparsed, we url encoded each part.
The code to do this is not the correct URLDecoder/URLEncoder, but has
some bugs especially related to unicode chars. Why do we do this?

All we might possibly need to escape:
- @ we do not need to escape, because it is only relevant the first time
  it occurs which will be after the keytype, which is a short string
  consisting entirely of letters (and maybe numbers). The decode will not
  in any case un-escape it if it has been escaped accidentally.
- Arguably it would be useful to support keys with slashes in them,
  bypassing the parsing of sub-manifests. But it is hardly essential
  functionality, as it doesn't work for web servers etc.
- Using url-encoding breaks i18n support completely. Anything that
  doesn't fit inside 8 bits is corrupted.
- It may cause unexpected behaviour. We already do a decode at fproxy
  level.

I have therefore removed the relevant code. It is more important that we
support wide chars than that we support slashes in key names.
-- 
Matthew J Toseland - toad at amphibian.dyndns.org
Freenet Project Official Codemonkey - http://freenetproject.org/
ICTHUS - Nothing is impossible. Our Boss says so.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: 
<https://emu.freenetproject.org/pipermail/tech/attachments/20060201/6a251b6a/attachment.pgp>

Reply via email to