You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by Andrew Phillips <no...@github.com> on 2013/08/29 19:40:12 UTC

[jclouds-labs] JCLOUDS-257: Removing special handling for URL decoding "magic" (#26)

Decoding &quot;magic&quot; was removed in https://github.com/jclouds/jclouds/commit/12f29fd8a9e50203acc12ccf794cf73c0abf5703
You can merge this Pull Request by running:

  git pull https://github.com/jclouds/jclouds-labs fix-fgcp-tests

Or you can view, comment on it, or merge it online at:

  https://github.com/jclouds/jclouds-labs/pull/26

-- Commit Summary --

  * JCLOUDS-257: Removing special handling for URL decoding &quot;magic&quot;

-- File Changes --

    M fgcp/src/main/java/org/jclouds/fujitsu/fgcp/filters/RequestAuthenticator.java (10)
    M fgcp/src/test/java/org/jclouds/fujitsu/fgcp/filters/RequestAuthenticatorTest.java (6)

-- Patch Links --

https://github.com/jclouds/jclouds-labs/pull/26.patch
https://github.com/jclouds/jclouds-labs/pull/26.diff


Re: [jclouds-labs] JCLOUDS-257: Removing special handling for URL decoding "magic" (#26)

Posted by Ignasi Barrera <no...@github.com>.
>Committed to master

Great!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/26#issuecomment-23572252

Re: [jclouds-labs] JCLOUDS-257: Removing special handling for URL decoding "magic" (#26)

Posted by Andrew Phillips <no...@github.com>.
> On vacation now, give me a few weeks.

@dkoper Ah, _that's_ where ;-) Have fun!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/26#issuecomment-23577079

Re: [jclouds-labs] JCLOUDS-257: Removing special handling for URL decoding "magic" (#26)

Posted by Andrew Phillips <no...@github.com>.
> @@ -155,22 +155,12 @@ public HttpRequest filter(HttpRequest request) throws HttpException {
>  
>     @VisibleForTesting
>     HttpRequest addQueryParamsToRequest(HttpRequest request, String accessKeyId, String signature, String lang) {
> -      // url encode "+" (which comes from base64 encoding) or else it may be
> -      // converted into a %20 (space) which the API endpoint doesn't
> -      // expect/accept.
> -      accessKeyId = accessKeyId.replace("+", "%2B");
> -      signature = signature.replace("+", "%2B");
> -

This special-case handling is now no longer required, since jclouds doesn't decode the `+` any more.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/26/files#r6067565

Re: [jclouds-labs] JCLOUDS-257: Removing special handling for URL decoding "magic" (#26)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-pull-requests #50](https://jclouds.ci.cloudbees.com/job/jclouds-labs-pull-requests/50/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/26#issuecomment-23508955

Re: [jclouds-labs] JCLOUDS-257: Removing special handling for URL decoding "magic" (#26)

Posted by Andrew Phillips <no...@github.com>.
@dkoper Comments on this much appreciated!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/26#issuecomment-23511898

Re: [jclouds-labs] JCLOUDS-257: Removing special handling for URL decoding "magic" (#26)

Posted by Andrew Phillips <no...@github.com>.
@andrewgaul Pinging you for a quick review here since you were involved in the discussion around the commit that caused this in the first place ;-)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/26#issuecomment-23555374

Re: [jclouds-labs] JCLOUDS-257: Removing special handling for URL decoding "magic" (#26)

Posted by Andrew Phillips <no...@github.com>.
Committed to [master](https://git-wip-us.apache.org/repos/asf?p=incubator-jclouds-labs.git;a=commit;h=028627f964dc19a1d29af0518c2c269a368d2d46)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/26#issuecomment-23572062

Re: [jclouds-labs] JCLOUDS-257: Removing special handling for URL decoding "magic" (#26)

Posted by Andrew Gaul <no...@github.com>.
+1 and good to commit so we can suppress labs failures .  However, I would really like to run the FGCP live tests, @dkoper can you do this?  Also would like to get jclouds out of the escaping game with Guava 15.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/26#issuecomment-23571388

Re: [jclouds-labs] JCLOUDS-257: Removing special handling for URL decoding "magic" (#26)

Posted by Andrew Phillips <no...@github.com>.
>        Multimap<String, String> decodedParams = queryParser().apply(request.getEndpoint().getRawQuery());
>        Builder<?> builder = request.toBuilder().endpoint(request.getEndpoint()).method(request.getMethod());
>        if (!decodedParams.containsKey("Version")) {
>           builder.addQueryParam(RequestParameters.VERSION, apiVersion);
>        }
>        builder.addQueryParam(RequestParameters.LOCALE, lang).addQueryParam(RequestParameters.ACCESS_KEY_ID, accessKeyId)
> -      // the addition of another param causes %2B's in prev. params to
> -      // convert to %20. Needs to be addressed if there are cases where
> -      // accessKeyId contains %2B's.
> -      // So signature should be added last:

This also doesn't happen any more - see the change to `testAddQueryParamsWithBase64Symbols`

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/26/files#r6067576

Re: [jclouds-labs] JCLOUDS-257: Removing special handling for URL decoding "magic" (#26)

Posted by Dies Koper <no...@github.com>.
@andrewgaul Sure I will. On vacation now, give me a few weeks.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/26#issuecomment-23576249

Re: [jclouds-labs] JCLOUDS-257: Removing special handling for URL decoding "magic" (#26)

Posted by Andrew Phillips <no...@github.com>.
[![Build Status](https://jclouds.ci.cloudbees.com/buildStatus/icon?job=jclouds-labs)](https://jclouds.ci.cloudbees.com/job/jclouds-labs/)

Yay!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/26#issuecomment-23574297