kopia lustrzana https://github.com/ryukoposting/Signal-Android
Apply Content-Range and Content-Length headers to resumable upload request.
rodzic
a7aec6bfbc
commit
b94a636542
|
@ -1128,13 +1128,18 @@ public class PushServiceSocket {
|
|||
Request.Builder request = new Request.Builder().url(urlBuilder.build())
|
||||
.post(RequestBody.create(null, ""));
|
||||
for (Map.Entry<String, String> header : headers.entrySet()) {
|
||||
request.header(header.getKey(), header.getValue());
|
||||
if (!header.getKey().equalsIgnoreCase("host")) {
|
||||
request.header(header.getKey(), header.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
if (connectionHolder.getHostHeader().isPresent()) {
|
||||
request.header("host", connectionHolder.getHostHeader().get());
|
||||
}
|
||||
|
||||
request.addHeader("Content-Length", "0");
|
||||
request.addHeader("Content-Type", "application/octet-stream");
|
||||
|
||||
Call call = okHttpClient.newCall(request.build());
|
||||
|
||||
synchronized (connections) {
|
||||
|
|
Ładowanie…
Reference in New Issue