@@ -1478,7 +1478,7 @@ public static BucketMetadata parseBucketMetadata(Map<String, String> headers) th
14781478 for (Iterator <String > it = headers .keySet ().iterator (); it .hasNext ();) {
14791479 String key = it .next ();
14801480
1481- if (key .equals (OSSHeaders .OSS_BUCKET_REGION )) {
1481+ if (key .equalsIgnoreCase (OSSHeaders .OSS_BUCKET_REGION )) {
14821482 bucketMetadata .setBucketRegion (headers .get (key ));
14831483 } else {
14841484 bucketMetadata .addHttpMetadata (key , headers .get (key ));
@@ -1503,20 +1503,20 @@ public static SimplifiedObjectMeta parseSimplifiedObjectMeta(Map<String, String>
15031503 for (Iterator <String > it = headers .keySet ().iterator (); it .hasNext ();) {
15041504 String key = it .next ();
15051505
1506- if (key .equals (OSSHeaders .LAST_MODIFIED )) {
1506+ if (key .equalsIgnoreCase (OSSHeaders .LAST_MODIFIED )) {
15071507 try {
15081508 objectMeta .setLastModified (DateUtil .parseRfc822Date (headers .get (key )));
15091509 } catch (ParseException pe ) {
15101510 throw new ResponseParseException (pe .getMessage (), pe );
15111511 }
1512- } else if (key .equals (OSSHeaders .CONTENT_LENGTH )) {
1512+ } else if (key .equalsIgnoreCase (OSSHeaders .CONTENT_LENGTH )) {
15131513 Long value = Long .valueOf (headers .get (key ));
15141514 objectMeta .setSize (value );
1515- } else if (key .equals (OSSHeaders .ETAG )) {
1515+ } else if (key .equalsIgnoreCase (OSSHeaders .ETAG )) {
15161516 objectMeta .setETag (trimQuotes (headers .get (key )));
1517- } else if (key .equals (OSSHeaders .OSS_HEADER_REQUEST_ID )) {
1517+ } else if (key .equalsIgnoreCase (OSSHeaders .OSS_HEADER_REQUEST_ID )) {
15181518 objectMeta .setRequestId (headers .get (key ));
1519- } else if (key .equals (OSSHeaders .OSS_HEADER_VERSION_ID )) {
1519+ } else if (key .equalsIgnoreCase (OSSHeaders .OSS_HEADER_VERSION_ID )) {
15201520 objectMeta .setVersionId (headers .get (key ));
15211521 }
15221522 }
@@ -1563,16 +1563,16 @@ public static ObjectMetadata parseObjectMetadata(Map<String, String> headers) th
15631563 if (key .indexOf (OSSHeaders .OSS_USER_METADATA_PREFIX ) >= 0 ) {
15641564 key = key .substring (OSSHeaders .OSS_USER_METADATA_PREFIX .length ());
15651565 objectMetadata .addUserMetadata (key , headers .get (OSSHeaders .OSS_USER_METADATA_PREFIX + key ));
1566- } else if (key .equals (OSSHeaders .LAST_MODIFIED ) || key .equals (OSSHeaders .DATE )) {
1566+ } else if (key .equalsIgnoreCase (OSSHeaders .LAST_MODIFIED )|| key .equalsIgnoreCase (OSSHeaders .DATE )) {
15671567 try {
15681568 objectMetadata .setHeader (key , DateUtil .parseRfc822Date (headers .get (key )));
15691569 } catch (ParseException pe ) {
15701570 throw new ResponseParseException (pe .getMessage (), pe );
15711571 }
1572- } else if (key .equals (OSSHeaders .CONTENT_LENGTH )) {
1572+ } else if (key .equalsIgnoreCase (OSSHeaders .CONTENT_LENGTH )) {
15731573 Long value = Long .valueOf (headers .get (key ));
15741574 objectMetadata .setHeader (key , value );
1575- } else if (key .equals (OSSHeaders .ETAG )) {
1575+ } else if (key .equalsIgnoreCase (OSSHeaders .ETAG )) {
15761576 objectMetadata .setHeader (key , trimQuotes (headers .get (key )));
15771577 } else {
15781578 objectMetadata .setHeader (key , headers .get (key ));
0 commit comments