The uri_encode method assumes '=' characters are key/value delimiters in the query string, which is a problem if the query string contains a base64 encoded signature with trailing padding characters like the following. Note both URI and Addressable preserve the trailing '=' but puppet does not: