Fix "CRITICAL" errors being logged when a request is received for a uri containing non-ascii characters.