jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Gaul <notificati...@github.com>
Subject Re: [jclouds/jclouds-labs] JCLOUDS-1005: Backblaze B2 skeleton and bucket ops (#270)
Date Sun, 22 May 2016 20:56:16 GMT
> +
> +   @Override
> +   public HttpRequest filter(HttpRequest request) throws HttpException {
> +      utils.logRequest(signatureLog, request, ">>");
> +      Credentials creds = this.creds.get();
> +      Authorization auth = cache.getUnchecked(creds);
> +
> +      // Replace fixed URL with API URL, except for unit tests tests
> +      URI endpoint = request.getEndpoint();
> +      if (!endpoint.getHost().equals("localhost")) {
> +         endpoint = URI.create(auth.apiUrl() + endpoint.getPath() + (endpoint.getQuery()
== null ? "" : "?" + endpoint.getQuery()));
> +      }
> +
> +      request = request.toBuilder()
> +            .endpoint(endpoint)
> +            // TODO: squirrel away accountId in bogus header so ReplacePayloadAccountId
can use it

This suggestion will take me a little while to investigate.  I will push an amended commit
addressing all other comments.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/270/files/08f67d68c03760ce134ccf217c3b1ee4487ac318#r64156127
Mime
View raw message