Skip to content

Commit 12ee8c0

Browse files
authored
Merge pull request #319 from MistyL/master
modify for paramter's format
2 parents 0bfd905 + 34101ec commit 12ee8c0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/com/qiniu/storage/BucketManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public Response changeHeaders(String bucket, String key, Map<String, String> hea
210210
String path = String.format("/chgm/%s", resource);
211211
for (String k : headers.keySet()) {
212212
String encodedMetaValue = UrlSafeBase64.encodeToString(headers.get(k));
213-
path = String.format("%s/%s/%s", path, k, encodedMetaValue);
213+
path = String.format("%s/x-qn-meta-!%s/%s", path, k, encodedMetaValue);
214214
}
215215
return rsPost(bucket, path, null);
216216
}

src/test/java/test/com/qiniu/storage/BucketTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ public void testChangeHeaders() {
279279
Date d = new Date();
280280
SimpleDateFormat dateFm = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss 'GMT'", Locale.ENGLISH);
281281
System.out.println(dateFm.format(d));
282-
headers.put("x-qn-meta-!Content-Type", "image/png");
283-
headers.put("x-qn-meta-!Last-Modifie", dateFm.format(d));
282+
headers.put("Content-Type", "image/png");
283+
headers.put("Last-Modified", dateFm.format(d));
284284
bucketManager.changeHeaders(bucket, key, headers);
285285
} catch (QiniuException e) {
286286
fail(bucket + ":" + key + "==> " + e.response.toString());

0 commit comments

Comments
 (0)