[Info-vax] URL encoding

Stephen Hoffman seaohveh at hoffmanlabs.invalid
Mon Jan 14 12:04:26 EST 2013


On 2013-01-14 04:47:32 +0000, David Froble said:

> I've been looking at this, and I've found a complete table of codes for 
> all kinds of characters.  However, it also seems that only a few 
> characters, such as space, normally get URL encoded.
> 
> Just asking what others might have seen.  Have instances of all 
> characters being URL encoded been experienced?

There's a list of a dozen or so required-to-be-encoded characters, and 
the rest of the character set can optionally be encoded.  Not 
everything around that should deal with the optionally-encoded 
characters actually does deal with that, so avoiding over-encoding 
stuff is a good idea.   Sometimes there's code around doesn't even deal 
(correctly) with the required-to-be-encoded stuff.

You probably don't have to deal with punycode (IDNA) or IPv6 stuff here 
(yet?), but you'll want to be aware of those.

Avoid shipping credentials within the URL.

Use https everywhere, unless you need http.

And FWIW (and as I've mentioned before), libwww can be your friend 
here.  There are rabbit holes here, and no shortage of lurking 
edge-cases.

Etc...

-- 
Pure Personal Opinion | HoffmanLabs LLC




More information about the Info-vax mailing list