HADOOP-14272. Azure: WasbRemoteCallHelper should use String equals for comparison. Contributed by Santhosh G Nayak
(cherry picked from commit 27a44b60c1
)
This commit is contained in:
parent
fbe86471cf
commit
ce8cdc109b
|
@ -88,7 +88,8 @@ class WasbRemoteCallHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
Header contentTypeHeader = response.getFirstHeader("Content-Type");
|
Header contentTypeHeader = response.getFirstHeader("Content-Type");
|
||||||
if (contentTypeHeader == null || contentTypeHeader.getValue() != APPLICATION_JSON) {
|
if (contentTypeHeader == null
|
||||||
|
|| !APPLICATION_JSON.equals(contentTypeHeader.getValue())) {
|
||||||
throw new WasbRemoteCallException(getRequest.getURI().toString() + ":" +
|
throw new WasbRemoteCallException(getRequest.getURI().toString() + ":" +
|
||||||
"Content-Type mismatch: expected: " + APPLICATION_JSON +
|
"Content-Type mismatch: expected: " + APPLICATION_JSON +
|
||||||
", got " + ((contentTypeHeader!=null) ? contentTypeHeader.getValue() : "NULL")
|
", got " + ((contentTypeHeader!=null) ? contentTypeHeader.getValue() : "NULL")
|
||||||
|
|
Loading…
Reference in New Issue