diff --git a/CHANGELOG.md b/CHANGELOG.md index ff29d019b..559c6de07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ #Changelog +## 7.0.4.1 (2015-08-27) + +### 修正 +* okhttp 2.4 兼容问题 + +### 变更 +* 多zone 支持 + ## 7.0.4 (2015-06-25) ### 变更 diff --git a/src/main/java/com/qiniu/common/Config.java b/src/main/java/com/qiniu/common/Config.java index 42f525e49..25ac95252 100644 --- a/src/main/java/com/qiniu/common/Config.java +++ b/src/main/java/com/qiniu/common/Config.java @@ -6,7 +6,7 @@ public final class Config { - public static final String VERSION = "7.0.4"; + public static final String VERSION = "7.0.4.1"; /** * 断点上传时的分块大小(默认的分块大小, 不允许改变) */ diff --git a/src/main/java/com/qiniu/http/Client.java b/src/main/java/com/qiniu/http/Client.java index a127fba3c..b17488ccc 100644 --- a/src/main/java/com/qiniu/http/Client.java +++ b/src/main/java/com/qiniu/http/Client.java @@ -98,21 +98,24 @@ public void accept(String key, Object value) { } public Response post(String url, byte[] body, StringMap headers, String contentType) throws QiniuException { - RequestBody rbody = null; + RequestBody rbody; if (body != null && body.length > 0) { MediaType t = MediaType.parse(contentType); - rbody = RequestBody.create(t, body); + } else { + rbody = RequestBody.create(null, new byte[0]); } return post(url, rbody, headers); } public Response post(String url, byte[] body, int offset, int size, StringMap headers, String contentType) throws QiniuException { - RequestBody rbody = null; + RequestBody rbody; if (body != null && body.length > 0) { MediaType t = MediaType.parse(contentType); rbody = create(t, body, offset, size); + } else { + rbody = RequestBody.create(null, new byte[0]); } return post(url, rbody, headers); }