{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/113","labels_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/113/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/113/comments","events_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/113/events","html_url":"https://github.com/chrsmith/google-api-java-client/issues/113","id":59360198,"number":113,"title":"OAuth compliant URL parameter encoding","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/Type-Enhancement","name":"Type-Enhancement","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-28T21:52:19Z","updated_at":"2015-02-28T21:52:20Z","closed_at":"2015-02-28T21:52:19Z","body":"```\nExternal references, such as a standards document, or specification?\nOAuth Core 1.0, Section 5.1\n\nJava environments (e.g. Java 6, Android 2.2, App Engine 1.3.7, or All)?\nAppEngine 1.4.0\n\nPlease describe the feature requested.\n\nThis issue is related to issue #95: When using form encoded HTTP parameters as \npart of the OAuth base string, characters have to be quoted in precisely the \nway specified by the OAuth Spec in section 5.1. Otherwise the signed base \nstrings don't match.\n\nIt would be nice if, for example, PercentEscaper (or UrlEncodedContent) offered \nexactly this encoding.  Currently, the necessary auxiliary function is not \nprovided by the library (nor by java.net.URLEncoder).  For accessing Google \nAPIs using OAuth the problem does not arise as the OAuth headers are already \nencoded and do not contain any offending characters.\n\n\nHow would you expect it to be fixed?\n\nA semantically correct, though somewhat slow implementation of the needed \nfunction is:\n\n  public String urlEncode(String String) { \n    return URLEncoder.encode(s, \"UTF-8\").replace(\"+\", \"%20\").replace(\"*\", \"%2A\").replace(\"%7E\", \"~\");\n  }\n\n```\n\nOriginal issue reported on code.google.com by `mathias.kegelmann` on 8 Feb 2011 at 11:46"},"comment":{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/comments/76548619","html_url":"https://github.com/chrsmith/google-api-java-client/issues/113#issuecomment-76548619","issue_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/113","id":76548619,"user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"created_at":"2015-02-28T21:52:19Z","updated_at":"2015-02-28T21:52:19Z","body":"```\nThanks for the feedback.\n\nAs far as I can tell the original issue is a duplicate of:\nhttp://code.google.com/p/google-oauth-java-client/issues/detail?id=1\n\nIn other words, we should be encoding format-encoded HTTP parameters, but we \nare not.  Please let me know if that is not the case.\n\nNote that it is not our goal to offer character-encoding functionality.  In \nfact, in hind-sight we wish we hadn't made this code public, and will likely \nremove it from this library in the future once character-encoding functionality \nis found in some third-party library that we can rely on.\n\nI think the second issue raised here with the Dropbox API is a separate issue, \nbecause that refers to which URI query parameter characters should be encoded, \nnot form-encoded parameters.  I would be surprised why not encoding '(' or ')' \nshould be a problem, but I haven't had a chance to investigate it.  If you are \nseeing a problem, please file a bug here:\n\nhttp://code.google.com/p/google-oauth-java-client/issues/entry\n```\n\nOriginal comment by `yan...@google.com` on 10 Jan 2012 at 1:54\n* Changed state: **Moved**"}}