{"action":"closed","issue":{"url":"https://api.github.com/repos/AsyncHttpClient/async-http-client/issues/960","labels_url":"https://api.github.com/repos/AsyncHttpClient/async-http-client/issues/960/labels{/name}","comments_url":"https://api.github.com/repos/AsyncHttpClient/async-http-client/issues/960/comments","events_url":"https://api.github.com/repos/AsyncHttpClient/async-http-client/issues/960/events","html_url":"https://github.com/AsyncHttpClient/async-http-client/issues/960","id":103624471,"number":960,"title":"OAuth signing duplicates query parameters","user":{"login":"nadavsamet","id":2171968,"avatar_url":"https://avatars.githubusercontent.com/u/2171968?v=3","gravatar_id":"","url":"https://api.github.com/users/nadavsamet","html_url":"https://github.com/nadavsamet","followers_url":"https://api.github.com/users/nadavsamet/followers","following_url":"https://api.github.com/users/nadavsamet/following{/other_user}","gists_url":"https://api.github.com/users/nadavsamet/gists{/gist_id}","starred_url":"https://api.github.com/users/nadavsamet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nadavsamet/subscriptions","organizations_url":"https://api.github.com/users/nadavsamet/orgs","repos_url":"https://api.github.com/users/nadavsamet/repos","events_url":"https://api.github.com/users/nadavsamet/events{/privacy}","received_events_url":"https://api.github.com/users/nadavsamet/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-28T00:59:05Z","updated_at":"2015-08-29T06:12:32Z","closed_at":"2015-08-29T06:12:32Z","body":"I encountered unexpected behavior of the OAuthSignatureCalculator. I'd love to get your thoughts about it.\r\n\r\nIf I define a request as following `val request = dispatch.url(\"http://www.example.com\").setMethod(\"GET\").setQueryParameters(Map(\"page\" -> Seq(\"1\"))`\r\nThe result of `request.toRequest.getUrl` will be `http://www.example.com?page=1`.\r\n\r\nIf I sign it using `val signedRequest = request.sign(consumer, token)` and then run `signedRequest.toRequest.getUrl`, the result will be `http://www.example.com?page=1&page=1`.\r\n\r\nA workaround can be `request\r\n  .setParameters(Map())\r\n  .sign(consumer, token)\r\n  .setQueryParameters(request.toRequest.getQueryParams.map(p => p.getName -> Seq(p.getValue)).toMap)`.\r\n\r\nAny idea what happened to OAuthSignatureCalculator? I think it was introduced a couple of versions ago.\r\n\r\nThanks!"}}