Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#Changelog

## 7.0.4.1 (2015-08-27)

### 修正
* okhttp 2.4 兼容问题

### 变更
* 多zone 支持

## 7.0.4 (2015-06-25)

### 变更
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/qiniu/common/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
/**
* 断点上传时的分块大小(默认的分块大小, 不允许改变)
*/
Expand Down
9 changes: 6 additions & 3 deletions src/main/java/com/qiniu/http/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down