This looks like a bug
```ruby
uri = normalize_uri(target_uri.path)
```