I propose to remove backport and add here the line (similar to another place (don't remember which one):

``` ruby
uri = URI.parse uri.to_s unless uri.is_a? URI
```