Skip to content

Commit

Permalink
Force HTTP/1.1 in chunked upload
Browse files Browse the repository at this point in the history
Signed-off-by: Dariusz Olszewski <[email protected]>
  • Loading branch information
starypatyk authored and mahibi committed Oct 28, 2022
1 parent bfc9f57 commit c18bafe
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ import com.nextcloud.talk.utils.Mimetype
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
import okhttp3.MediaType
import okhttp3.OkHttpClient
import okhttp3.Protocol
import okhttp3.Response
import java.io.File
import java.io.IOException
import java.io.RandomAccessFile
import java.nio.channels.FileChannel
import java.util.Arrays
import java.util.Locale

@AutoInjector(NextcloudTalkApplication::class)
Expand Down Expand Up @@ -290,6 +292,7 @@ class ChunkedFileUploader(
okHttpClientBuilder.followRedirects(false)
okHttpClientBuilder.followSslRedirects(false)
// okHttpClientBuilder.readTimeout(Duration.ofMinutes(30)) // TODO set timeout
okHttpClientBuilder.protocols(Arrays.asList(Protocol.HTTP_1_1))
okHttpClientBuilder.authenticator(
RestModule.MagicAuthenticator(
ApiUtils.getCredentials(
Expand Down

0 comments on commit c18bafe

Please sign in to comment.