private static long resolveMaxContentSize(ConnectorConfig cfg) {
        // Scale based on max heap size if 0
        long maxContentSize = cfg.maxContentSize() != 0
                ? cfg.maxContentSize() : Math.min(Runtime.getRuntime().maxMemory() / 2, Integer.MAX_VALUE - 8);
        log.fine(() -> Text.format("maxContentSize=%d", maxContentSize));
        return maxContentSize;
    }
Reads request content from a Jetty {@link Request} and writes it to the {@link ContentChannel}
returned by the {@link com.yahoo.jdisc.handler.RequestHandler}.

@author bjorncs
container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/JettyRequestContentReader.java