Skip to content

Commit abe671c

Browse files
author
YangSen-qn
committed
modify upload logic
1 parent 8d96b2d commit abe671c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

library/src/main/java/com/qiniu/android/http/request/RequestTransaction.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,6 @@ public void reportLog(byte[] logData,
342342
header.put("Authorization", token);
343343
header.put("Content-Type", "text/plain");
344344
header.put("User-Agent", userAgent);
345-
header.put("Content-Encoding", "gzip");
346345

347346
if (logClientId != null){
348347
header.put("X-Log-Client-Id", logClientId);
@@ -354,7 +353,7 @@ public boolean shouldRetry(ResponseInfo responseInfo, JSONObject response) {
354353
return !responseInfo.isOK();
355354
}
356355
};
357-
regionRequest.post("/log/4", isAsync, GZipUtil.gZip(logData), header, shouldRetryHandler, null, new HttpRegionRequest.RequestCompleteHandler() {
356+
regionRequest.post("/log/4?compressed=gzip", isAsync, GZipUtil.gZip(logData), header, shouldRetryHandler, null, new HttpRegionRequest.RequestCompleteHandler() {
358357
@Override
359358
public void complete(ResponseInfo responseInfo, UploadRegionRequestMetrics requestMetrics, JSONObject response) {
360359
completeHandler.complete(responseInfo, requestMetrics, response);

0 commit comments

Comments
 (0)