in reply to Re: Normalizing URLs
in thread Normalizing URLs
From what I saw, URI
- Lowercases the scheme.
- Lowercases the domain name. (1)
- Removes the port if it's the default. (2)
- Removes port fields consisting of just ':'. (3)
- Adds trailing '/' if no path or query is specified. (6, partial)
- Doesn't do (4), (5), (7) and (8), but easy to do.
- Doesn't do (9) and (10), but might not be possible.
- Doesn't set the path to '/' if no path is specified and a query is specified. (6, partial)
- Doesn't normalize IP addresses in to dotted form.
- Doesn't remove the trailing '.' from domain names, if any.
- Doesn't touch the query.