Server: fix uri detection