Skip to content
Snippets Groups Projects
Commit fbdc2828 authored by Hamza Remmal's avatar Hamza Remmal
Browse files

Merge branch 'mb/backport-limits' into '1.0.x'

Backport "Increase limit for downloads"

See merge request !270
parents 07af49de 0d3e5240
Branches
Tags
1 merge request!270Backport "Increase limit for downloads"
Pipeline #220092 failed
......@@ -19,6 +19,7 @@ import reactor.netty.http.client.HttpClient;
* @author Hamza REMMAL (hamza.remmal@epfl.ch)
*/
public final class AutogradeClientFactory {
private static final int MAX_IN_MEMORY_SIZE = 100 * 1024 * 1024; // 100 MiB
/**
* ???
......@@ -30,14 +31,14 @@ public final class AutogradeClientFactory {
var http = HttpClient.create()
.httpResponseDecoder(spec ->
spec.maxHeaderSize(32 * 1024) // 32 kb
.h2cMaxContentLength(5 * 1024 * 1024) // 5 MB
spec.maxHeaderSize(MAX_IN_MEMORY_SIZE)
.h2cMaxContentLength(MAX_IN_MEMORY_SIZE)
);
var builder = WebClient.builder()
.baseUrl(url)
.codecs(conf ->
conf.defaultCodecs().maxInMemorySize(10 * 1024 * 1024)
conf.defaultCodecs().maxInMemorySize(MAX_IN_MEMORY_SIZE)
)
.clientConnector(new ReactorClientHttpConnector(http))
.defaultHeader(CONTENT_TYPE, APPLICATION_JSON_VALUE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment