canonicalPath nice and tested.
canonicalQuery nice and tested.