Please use the target_uri and normalize_uri functions provided by the HttpClient mixin here. In order to use target_uri the datastore option TARGET_URI should be used. The result should be something like:

```ruby
tpath = normalize_uri(target_uri.path)
```