hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [1/6] hadoop git commit: HADOOP-12088. KMSClientProvider uses equalsIgnoreCase("application/json"). (Brahma Reddy Battula via stevel)
Date Mon, 20 Jul 2015 12:32:38 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 208b9eed9 -> d3c23c7b1
  refs/heads/trunk 9141e1aa1 -> 98c2bc87b


HADOOP-12088. KMSClientProvider uses equalsIgnoreCase("application/json").   (Brahma Reddy
Battula via stevel)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d68b044f
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d68b044f
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d68b044f

Branch: refs/heads/branch-2
Commit: d68b044f0f477b46f527b9d64b8aa5f2c7a6bb10
Parents: 208b9ee
Author: Steve Loughran <stevel@apache.org>
Authored: Mon Jul 20 13:02:51 2015 +0100
Committer: Steve Loughran <stevel@apache.org>
Committed: Mon Jul 20 13:02:51 2015 +0100

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt                  | 3 +++
 .../java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/d68b044f/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index dfc807c..1769f02 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -487,6 +487,9 @@ Release 2.8.0 - UNRELEASED
     HADOOP-12209 Comparable type should be in FileStatus.
     (Yong Zhang via stevel)
 
+    HADOOP-12088. KMSClientProvider uses equalsIgnoreCase("application/json").
+    (Brahma Reddy Battula via stevel)
+
 Release 2.7.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/d68b044f/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
index 149424f..4698a83 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java
@@ -544,7 +544,9 @@ public class KMSClientProvider extends KeyProvider implements CryptoExtension,
       // AuthenticatedURL properly to set authToken post initialization)
     }
     HttpExceptionUtils.validateResponse(conn, expectedResponse);
-    if (APPLICATION_JSON_MIME.equalsIgnoreCase(conn.getContentType())
+    if (conn.getContentType() != null
+        && conn.getContentType().trim().toLowerCase()
+            .startsWith(APPLICATION_JSON_MIME)
         && klass != null) {
       ObjectMapper mapper = new ObjectMapper();
       InputStream is = null;


Mime
View raw message