HADOOP-12767. Update apache httpclient version to 4.5.2; httpcore to 4.4.4. Artem Aliev via stevel.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/22ff9e68 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/22ff9e68 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/22ff9e68 Branch: refs/heads/HDFS-7240 Commit: 22ff9e68d1d9f27d62455c15fb1242538551aca9 Parents: c7159f0 Author: Steve Loughran <ste...@apache.org> Authored: Thu May 19 14:44:44 2016 +0100 Committer: Steve Loughran <ste...@apache.org> Committed: Thu May 19 14:48:18 2016 +0100 ---------------------------------------------------------------------- .../web/DelegationTokenAuthenticationFilter.java | 7 +++++-- .../security/token/delegation/web/ServletUtils.java | 7 +++++-- hadoop-project/pom.xml | 4 ++-- .../hadoop/yarn/server/webproxy/WebAppProxyServlet.java | 11 +++++++---- 4 files changed, 19 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/22ff9e68/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/web/DelegationTokenAuthenticationFilter.java ---------------------------------------------------------------------- diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/web/DelegationTokenAuthenticationFilter.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/web/DelegationTokenAuthenticationFilter.java index af66ee5..fb6817e 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/web/DelegationTokenAuthenticationFilter.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/web/DelegationTokenAuthenticationFilter.java @@ -216,8 +216,11 @@ public class DelegationTokenAuthenticationFilter @VisibleForTesting static String getDoAs(HttpServletRequest request) { - List<NameValuePair> list = URLEncodedUtils.parse(request.getQueryString(), - UTF8_CHARSET); + String queryString = request.getQueryString(); + if (queryString == null) { + return null; + } + List<NameValuePair> list = URLEncodedUtils.parse(queryString, UTF8_CHARSET); if (list != null) { for (NameValuePair nv : list) { if (DelegationTokenAuthenticatedURL.DO_AS. http://git-wip-us.apache.org/repos/asf/hadoop/blob/22ff9e68/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/web/ServletUtils.java ---------------------------------------------------------------------- diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/web/ServletUtils.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/web/ServletUtils.java index 16137ac..078dfa4 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/web/ServletUtils.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/web/ServletUtils.java @@ -45,8 +45,11 @@ class ServletUtils { */ public static String getParameter(HttpServletRequest request, String name) throws IOException { - List<NameValuePair> list = URLEncodedUtils.parse(request.getQueryString(), - UTF8_CHARSET); + String queryString = request.getQueryString(); + if (queryString == null) { + return null; + } + List<NameValuePair> list = URLEncodedUtils.parse(queryString, UTF8_CHARSET); if (list != null) { for (NameValuePair nv : list) { if (name.equals(nv.getName())) { http://git-wip-us.apache.org/repos/asf/hadoop/blob/22ff9e68/hadoop-project/pom.xml ---------------------------------------------------------------------- diff --git a/hadoop-project/pom.xml b/hadoop-project/pom.xml index 46ecb23..3a2f9d9 100644 --- a/hadoop-project/pom.xml +++ b/hadoop-project/pom.xml @@ -462,12 +462,12 @@ <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> - <version>4.2.5</version> + <version>4.5.2</version> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpcore</artifactId> - <version>4.2.5</version> + <version>4.4.4</version> </dependency> <dependency> <groupId>commons-codec</groupId> http://git-wip-us.apache.org/repos/asf/hadoop/blob/22ff9e68/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java index 9d64667..0b621aa 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java @@ -423,11 +423,14 @@ public class WebAppProxyServlet extends HttpServlet { // Append the user-provided path and query parameter to the original // tracking url. - List<NameValuePair> queryPairs = - URLEncodedUtils.parse(req.getQueryString(), null); UriBuilder builder = UriBuilder.fromUri(trackingUri); - for (NameValuePair pair : queryPairs) { - builder.queryParam(pair.getName(), pair.getValue()); + String queryString = req.getQueryString(); + if (queryString != null) { + List<NameValuePair> queryPairs = + URLEncodedUtils.parse(queryString, null); + for (NameValuePair pair : queryPairs) { + builder.queryParam(pair.getName(), pair.getValue()); + } } URI toFetch = builder.path(rest).build(); --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org