Improved parsing of URI to fix inability to parse replication request