malformed URI adjustment for 404 with test case