In production, we've seen a few shorteners return unencoded URIs in their Location headers (contrary to the RFC 7231 specification). We could use URI.escape and URI.unescape to deal with these but they have been deprecated. Instead, bring in the Addressable gem as a dependency to handle normalisation.
This means that Embiggen now returns Addressable::URIs rather than Ruby standard library URIs which is a breaking API change if you rely on URI-specific features (e.g. port which is much stricter with Addressable).
GitHub: https://github.com/altmetric/embiggen/issues/4
In production, we've seen a few shorteners return unencoded URIs in their Location headers (contrary to the RFC 7231 specification). We could use
URI.escape
andURI.unescape
to deal with these but they have been deprecated. Instead, bring in the Addressable gem as a dependency to handle normalisation.This means that Embiggen now returns
Addressable::URIs
rather than Ruby standard libraryURI
s which is a breaking API change if you rely onURI
-specific features (e.g.port
which is much stricter with Addressable).