Skip to content

Commit d0ddb4c

Browse files
vadmesteharshavardhana
authored andcommitted
tests: Do not expect 'UTC' in Last-Modified header (#548)
According to HTTP RFC (https://tools.ietf.org/html/rfc7232#page-7), Last-Modified header should always contain 'GMT' word since it is a http-date, 'UTC' is not supported though it has the same meaning of GMT.
1 parent 56fecf2 commit d0ddb4c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

api/src/test/java/io/minio/MinioClientTest.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public class MinioClientTest {
7272
private static final String ACCEPT_RANGES = "Accept-Ranges";
7373
private static final String CONTENT_RANGE = "Content-Range";
7474
private static final String SUN_29_JUN_2015_22_01_10_GMT = "Sun, 29 Jun 2015 22:01:10 GMT";
75-
private static final String MON_04_MAY_2015_07_58_51_UTC = "Mon, 04 May 2015 07:58:51 UTC";
7675
private static final String BUCKET_KEY = "/bucket/key";
7776
private static final String MD5_HASH_STRING = "\"5eb63bbbe01eeed093cb22bb8f5acdc3\"";
7877
private static final ObjectMapper objectMapper =
@@ -509,7 +508,7 @@ public void testPutSmallObject()
509508
MockResponse response = new MockResponse();
510509

511510
response.addHeader("Date", SUN_29_JUN_2015_22_01_10_GMT);
512-
response.addHeader(LAST_MODIFIED, MON_04_MAY_2015_07_58_51_UTC);
511+
response.addHeader(LAST_MODIFIED, MON_04_MAY_2015_07_58_51_GMT);
513512
response.addHeader("ETag", MD5_HASH_STRING);
514513
response.setResponseCode(200);
515514

@@ -607,7 +606,7 @@ public void testSpecialCharsNameWorks()
607606
MockResponse response = new MockResponse();
608607

609608
response.addHeader("Date", SUN_29_JUN_2015_22_01_10_GMT);
610-
response.addHeader(LAST_MODIFIED, MON_04_MAY_2015_07_58_51_UTC);
609+
response.addHeader(LAST_MODIFIED, MON_04_MAY_2015_07_58_51_GMT);
611610
response.addHeader("ETag", MD5_HASH_STRING);
612611
response.setResponseCode(200);
613612

@@ -633,7 +632,7 @@ public void testNullContentTypeWorks()
633632
MockResponse response = new MockResponse();
634633

635634
response.addHeader("Date", SUN_29_JUN_2015_22_01_10_GMT);
636-
response.addHeader(LAST_MODIFIED, MON_04_MAY_2015_07_58_51_UTC);
635+
response.addHeader(LAST_MODIFIED, MON_04_MAY_2015_07_58_51_GMT);
637636
response.addHeader("ETag", MD5_HASH_STRING);
638637
response.setResponseCode(200);
639638

@@ -655,7 +654,7 @@ public void testCustomContentTypeWorks()
655654
MockResponse response = new MockResponse();
656655

657656
response.addHeader("Date", SUN_29_JUN_2015_22_01_10_GMT);
658-
response.addHeader(LAST_MODIFIED, MON_04_MAY_2015_07_58_51_UTC);
657+
response.addHeader(LAST_MODIFIED, MON_04_MAY_2015_07_58_51_GMT);
659658
response.addHeader("ETag", MD5_HASH_STRING);
660659
response.setResponseCode(200);
661660

@@ -686,7 +685,7 @@ public void testSigningKey()
686685
response2.addHeader(CONTENT_LENGTH, "5080");
687686
response2.addHeader(CONTENT_TYPE, APPLICATION_OCTET_STREAM);
688687
response2.addHeader("ETag", "\"a670520d9d36833b3e28d1e4b73cbe22\"");
689-
response2.addHeader(LAST_MODIFIED, MON_04_MAY_2015_07_58_51_UTC);
688+
response2.addHeader(LAST_MODIFIED, MON_04_MAY_2015_07_58_51_GMT);
690689
response2.setResponseCode(200);
691690
server.enqueue(response2);
692691

0 commit comments

Comments
 (0)