[ https://issues.apache.org/jira/browse/STREAMS-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16052981#comment-16052981 ]
ASF GitHub Bot commented on STREAMS-508: ---------------------------------------- Github user jfrazee commented on a diff in the pull request: https://github.com/apache/incubator-streams/pull/368#discussion_r122575882 --- Diff: streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/TwitterOAuthRequestInterceptor.java --- @@ -84,16 +85,20 @@ public void process(HttpRequest httpRequest, HttpContext httpContext) throws Htt oauthParamMap.put("oauth_version", oauth_version); String request_host = ((HttpRequestWrapper)httpRequest).getTarget().toString().replace(":443",""); - String request_path = httpRequest.getRequestLine().getUri().substring(0, httpRequest.getRequestLine().getUri().indexOf('?')); - String request_param_line = httpRequest.getRequestLine().getUri().substring(httpRequest.getRequestLine().getUri().indexOf('?')+1); - String[] request_params = URLDecoder.decode(request_param_line).split("&"); + String request_path = httpRequest.getRequestLine().getUri(); Map<String,String> allParamsMap = new HashMap<>(oauthParamMap); - for( String request_param : request_params ) { - String key = request_param.substring(0, request_param.indexOf('=')); - String value = request_param.substring(request_param.indexOf('=')+1, request_param.length()); - allParamsMap.put(key, value); + if( request_path.contains("?")) { --- End diff -- Any reason to not use the `URLEncodedUtils.parse` from httpclient? > Utilize new third-party rest proxy capability in provider-twitter > ----------------------------------------------------------------- > > Key: STREAMS-508 > URL: https://issues.apache.org/jira/browse/STREAMS-508 > Project: Streams > Issue Type: Improvement > Reporter: Steve Blackmon > Assignee: Steve Blackmon > Original Estimate: 4h > Remaining Estimate: 4h > > Requires upgrade juneau dependency to 6.2.1 -- This message was sent by Atlassian JIRA (v6.4.14#64029)