Skip to content

Commit 1100647

Browse files
committed
resumable io: fix invalid argument
1 parent 714beb4 commit 1100647

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/com/qiniu/resumableio/ResumableClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ public ICancel bput(String host, InputStreamAt input, String ctx, long blockOffs
105105

106106
public ICancel mkfile(String key, long fsize, String mimeType, Map<String, String> params, String ctxs, CallRet ret) {
107107
String url = Conf.UP_HOST + "/mkfile/" + fsize;
108-
if (mimeType != null) {
108+
if (mimeType != null && mimeType.length() > 0) {
109109
url += "/mimeType/" + encode(mimeType);
110110
}
111-
if (key != null) {
111+
if (key != null && key.length() > 0) {
112112
url += "/key/" + encode(key);
113113
}
114114
if (params != null && params.size() > 0) {

0 commit comments

Comments
 (0)