This is an automated email from the ASF dual-hosted git repository.
xiazcy pushed a commit to branch master-http
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
The following commit(s) were added to refs/heads/master-http by this push:
new f01eefc90e Java driver - renamed maxContentLength to
maxResponseContentLength, changed int to long to allow for higher max value,
increased default value to Integer.MAX_VALUE as the size check is now done
against the total response size instead of previous web socket frame size, and
changed zero to be acceptable value which disables the response size check.
Gremlin server - renamed maxContentLength to maxRequestContentLength and
updated documentation for clarity. (#2749)
f01eefc90e is described below
commit f01eefc90e5fb27f39c258296297d00625605d6c
Author: andreachild <[email protected]>
AuthorDate: Thu Sep 5 10:17:19 2024 -0700
Java driver - renamed maxContentLength to maxResponseContentLength, changed
int to long to allow for higher max value, increased default value to
Integer.MAX_VALUE as the size check is now done against the total response size
instead of previous web socket frame size, and changed zero to be acceptable
value which disables the response size check. Gremlin server - renamed
maxContentLength to maxRequestContentLength and updated documentation for
clarity. (#2749)
---
CHANGELOG.asciidoc | 2 +
.../gremlin-server-integration-krb5.yaml | 2 +-
.../gremlin-server-integration-secure.yaml | 2 +-
.../gremlin-server/gremlin-server-integration.yaml | 2 +-
docs/src/reference/gremlin-applications.asciidoc | 2 +-
docs/src/reference/gremlin-variants.asciidoc | 9 +-
docs/src/upgrade/release-4.x.x.asciidoc | 6 ++
.../console/jsr223/gremlin-server-integration.yaml | 2 +-
.../tinkerpop/gremlin/driver/Channelizer.java | 2 +-
.../apache/tinkerpop/gremlin/driver/Cluster.java | 23 +++--
.../tinkerpop/gremlin/driver/Connection.java | 2 +-
.../apache/tinkerpop/gremlin/driver/Settings.java | 10 +-
.../handler/HttpGremlinResponseStreamDecoder.java | 16 ++--
.../gremlin/driver/ClusterBuilderTest.java | 3 +-
.../tinkerpop/gremlin/driver/SettingsTest.java | 4 +-
.../HttpGremlinResponseStreamDecoderTest.java | 102 +++++++++++++++++++++
gremlin-server/conf/gremlin-server-classic.yaml | 2 +-
.../conf/gremlin-server-modern-readonly.yaml | 2 +-
gremlin-server/conf/gremlin-server-modern.yaml | 2 +-
gremlin-server/conf/gremlin-server-neo4j.yaml | 2 +-
.../conf/gremlin-server-rest-modern.yaml | 2 +-
.../conf/gremlin-server-rest-secure.yaml | 2 +-
gremlin-server/conf/gremlin-server-secure.yaml | 2 +-
gremlin-server/conf/gremlin-server-spark.yaml | 2 +-
.../conf/gremlin-server-transaction.yaml | 2 +-
gremlin-server/conf/gremlin-server.yaml | 2 +-
.../apache/tinkerpop/gremlin/server/Settings.java | 7 +-
.../gremlin/server/channel/HttpChannelizer.java | 2 +-
.../gremlin/server/util/GremlinError.java | 2 +-
.../driver/ClientConnectionIntegrateTest.java | 6 +-
.../driver/remote/AbstractRemoteGraphProvider.java | 4 +-
.../gremlin/server/GremlinDriverIntegrateTest.java | 17 +++-
.../server/GremlinServerHttpIntegrateTest.java | 2 +-
.../gremlin/server/GremlinServerIntegrateTest.java | 6 +-
.../gremlin/server/gremlin-server-integration.yaml | 2 +-
35 files changed, 188 insertions(+), 69 deletions(-)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index e866a96bbf..ab83dde4d3 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -62,6 +62,8 @@
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
* Fixed `GremlinLangScriptEngine` handling for some strategies.
* Updated Docker test suite set-up in `gremlin-python` to work with HTTP
driver/server.
* Modified the `split()` step to split a string into a list of its characters
if the given separator is an empty string.
+* The `maxContentLength` setting for Gremlin Driver has been renamed to
`maxResponseContentLength` and now blocks incoming responses that are too large
based on total response size.
+* The `maxContentLength` setting for Gremlin Server has been renamed to
`maxRequestContentLength`.
== TinkerPop 3.7.0 (Gremfir Master of the Pan Flute)
diff --git a/docker/gremlin-server/gremlin-server-integration-krb5.yaml
b/docker/gremlin-server/gremlin-server-integration-krb5.yaml
index 93b3279cd1..6dfd94dfc5 100644
--- a/docker/gremlin-server/gremlin-server-integration-krb5.yaml
+++ b/docker/gremlin-server/gremlin-server-integration-krb5.yaml
@@ -50,7 +50,7 @@ keepAliveInterval: 0
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
-maxContentLength: 10485760
+maxRequestContentLength: 10485760
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
writeBufferLowWaterMark: 32768
diff --git a/docker/gremlin-server/gremlin-server-integration-secure.yaml
b/docker/gremlin-server/gremlin-server-integration-secure.yaml
index 42447f5ac3..6528551cb9 100644
--- a/docker/gremlin-server/gremlin-server-integration-secure.yaml
+++ b/docker/gremlin-server/gremlin-server-integration-secure.yaml
@@ -48,7 +48,7 @@ keepAliveInterval: 0
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
-maxContentLength: 10485760
+maxRequestContentLength: 10485760
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
writeBufferLowWaterMark: 32768
diff --git a/docker/gremlin-server/gremlin-server-integration.yaml
b/docker/gremlin-server/gremlin-server-integration.yaml
index f6d9b437e4..8f5d2f74f8 100644
--- a/docker/gremlin-server/gremlin-server-integration.yaml
+++ b/docker/gremlin-server/gremlin-server-integration.yaml
@@ -50,7 +50,7 @@ keepAliveInterval: 0
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
-maxContentLength: 10485760
+maxRequestContentLength: 10485760
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
writeBufferLowWaterMark: 32768
diff --git a/docs/src/reference/gremlin-applications.asciidoc
b/docs/src/reference/gremlin-applications.asciidoc
index c0ab64a342..759cf09fc5 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -1003,7 +1003,7 @@ The following table describes the various YAML
configuration options that Gremli
|keepAliveInterval |Time in milliseconds that the server will allow a channel
to not send responses to a client before it sends a "ping" to see if it is
still present. If it is present, the client should respond with a "pong" which
will thus reset the `idleConnectionTimeout` and keep the channel open. If
enabled, this number should be smaller than the value provided to the
`idleConnectionTimeout`. Note that while this value is to be provided as
milliseconds it will resolve to second prec [...]
|maxAccumulationBufferComponents |Maximum number of request components that
can be aggregated for a message. |1024
|maxChunkSize |The maximum length of the content or each chunk. If the
content length exceeds this value, the transfer encoding of the decoded request
will be converted to 'chunked' and the content will be split into multiple
`HttpContent` objects. If the transfer encoding of the HTTP request is
'chunked' already, each chunk will be split into smaller chunks if the length
of the chunk exceeds this value. |8192
-|maxContentLength |The maximum length of the aggregated content for a message.
Works in concert with `maxChunkSize` where chunked requests are accumulated
back into a single message. A request exceeding this size will return a `413 -
Request Entity Too Large` status code. A response exceeding this size will
raise an internal exception. |65536
+|maxRequestContentLength |The maximum length of the aggregated content for a
request message. Works in concert with `maxChunkSize` where chunked requests
are accumulated back into a single message. A request exceeding this size will
return a `413 - Request Entity Too Large` status code. |10485760
|maxHeaderSize |The maximum length of all headers. |8192
|maxInitialLineLength |The maximum length of the initial line (e.g. "GET /
HTTP/1.0") processed in a request, which essentially controls the maximum
length of the submitted URI. |4096
|maxParameters |The maximum number of parameters that can be passed on a
request. Larger numbers may impact performance for scripts. This configuration
only applies to the `HttpChannelizer`. |16
diff --git a/docs/src/reference/gremlin-variants.asciidoc
b/docs/src/reference/gremlin-variants.asciidoc
index e5c90fb29a..d148a84ff8 100644
--- a/docs/src/reference/gremlin-variants.asciidoc
+++ b/docs/src/reference/gremlin-variants.asciidoc
@@ -797,7 +797,7 @@ The following table describes the various configuration
options for the Gremlin
|connectionPool.keyStore |The private key in JKS or PKCS#12 format. |_none_
|connectionPool.keyStorePassword |The password of the `keyStore` if it is
password-protected. |_none_
|connectionPool.keyStoreType |`JKS` (Java 8 default) or `PKCS12` (Java 9+
default)|_none_
-|connectionPool.maxContentLength |The maximum length in bytes that a message
can be sent to the server. This number can be no greater than the setting of
the same name in the server configuration. |65536
+|connectionPool.maxResponseContentLength |The maximum length in bytes that a
message can be received from the server. |2147483647
|connectionPool.maxInProcessPerConnection |The maximum number of in-flight
requests that can occur on a connection. |4
|connectionPool.maxSimultaneousUsagePerConnection |The maximum number of times
that a connection can be borrowed from the pool simultaneously. |16
|connectionPool.maxSize |The maximum size of a connection pool for a host. |8
@@ -1166,11 +1166,10 @@ paths to the generated code automatically.
[[gremlin-java-troubleshooting]]
=== Troubleshooting
-*Max frame length of 65536 has been exceeded*
+*Response exceeded X bytes.*
-This error occurs when the driver attempts to process a request/response that
exceeds the configured maximum size.
-The most direct way to fix this problem is to increase the `maxContentLength`
setting in the driver. Ideally, the
-`maxContentLength` set for the driver should match the setting defined on the
server.
+This error occurs when the driver attempts to process a response that exceeds
the configured maximum response size.
+The most direct way to fix this problem is to increase the
`maxResponseContentLength` setting in the driver.
*TimeoutException*
diff --git a/docs/src/upgrade/release-4.x.x.asciidoc
b/docs/src/upgrade/release-4.x.x.asciidoc
index 7d369ba2a9..00cc92e01a 100644
--- a/docs/src/upgrade/release-4.x.x.asciidoc
+++ b/docs/src/upgrade/release-4.x.x.asciidoc
@@ -30,6 +30,12 @@ complete list of all the modifications that are part of this
release.
=== Upgrading for Users
+==== Configuration changes
+This is a placeholder to summarize configuration-related changes.
+
+* `maxContentLength` setting for Gremlin Driver has been renamed to
`maxResponseContentLength` and now blocks incoming responses that are too large
based on total response size.
+* `maxContentLength` setting for Gremlin Server has been renamed to
`maxRequestContentLength`.
+
==== Simplification to g creation
The creation of "g" is the start point to writing Gremlin. There are a number
of ways to create it, but TinkerPop has
diff --git
a/gremlin-console/src/test/resources/org/apache/tinkerpop/gremlin/console/jsr223/gremlin-server-integration.yaml
b/gremlin-console/src/test/resources/org/apache/tinkerpop/gremlin/console/jsr223/gremlin-server-integration.yaml
index 58cee6de04..4bb6dcf754 100644
---
a/gremlin-console/src/test/resources/org/apache/tinkerpop/gremlin/console/jsr223/gremlin-server-integration.yaml
+++
b/gremlin-console/src/test/resources/org/apache/tinkerpop/gremlin/console/jsr223/gremlin-server-integration.yaml
@@ -36,7 +36,7 @@ strictTransactionManagement: false
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
-maxContentLength: 65536
+maxRequestContentLength: 65536
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
writeBufferLowWaterMark: 32768
diff --git
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Channelizer.java
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Channelizer.java
index fb37f01306..8b80cc3457 100644
---
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Channelizer.java
+++
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Channelizer.java
@@ -174,7 +174,7 @@ public interface Channelizer extends ChannelHandler {
httpCompressionDecoder = new HttpContentDecompressionHandler();
gremlinRequestEncoder = new
HttpGremlinRequestEncoder(cluster.getSerializer(),
cluster.getRequestInterceptor(), cluster.isUserAgentOnConnectEnabled());
- gremlinResponseDecoder = new
HttpGremlinResponseStreamDecoder(cluster.getSerializer(),
cluster.getMaxContentLength());
+ gremlinResponseDecoder = new
HttpGremlinResponseStreamDecoder(cluster.getSerializer(),
cluster.getMaxResponseContentLength());
}
@Override
diff --git
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java
index 4453297c67..59593d0f14 100644
---
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java
+++
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java
@@ -174,7 +174,7 @@ public final class Cluster {
.workerPoolSize(settings.workerPoolSize)
.reconnectInterval(settings.connectionPool.reconnectInterval)
.resultIterationBatchSize(settings.connectionPool.resultIterationBatchSize)
- .maxContentLength(settings.connectionPool.maxContentLength)
+
.maxResponseContentLength(settings.connectionPool.maxResponseContentLength)
.maxWaitForConnection(settings.connectionPool.maxWaitForConnection)
.maxConnectionPoolSize(settings.connectionPool.maxSize)
.minConnectionPoolSize(settings.connectionPool.minSize)
@@ -328,10 +328,10 @@ public final class Cluster {
}
/**
- * Gets the maximum size in bytes of any request sent to the server.
+ * Gets the maximum size in bytes of any request received from the server.
*/
- public int getMaxContentLength() {
- return manager.connectionPoolSettings.maxContentLength;
+ public long getMaxResponseContentLength() {
+ return manager.connectionPoolSettings.maxResponseContentLength;
}
/**
@@ -475,7 +475,7 @@ public final class Cluster {
private int maxConnectionPoolSize = ConnectionPool.MAX_POOL_SIZE;
private int maxWaitForConnection = Connection.MAX_WAIT_FOR_CONNECTION;
private int maxWaitForClose = Connection.MAX_WAIT_FOR_CLOSE;
- private int maxContentLength = Connection.MAX_CONTENT_LENGTH;
+ private long maxResponseContentLength =
Connection.MAX_RESPONSE_CONTENT_LENGTH;
private int reconnectInterval = Connection.RECONNECT_INTERVAL;
private int resultIterationBatchSize =
Connection.RESULT_ITERATION_BATCH_SIZE;
private boolean enableSsl = false;
@@ -697,11 +697,10 @@ public final class Cluster {
}
/**
- * The maximum size in bytes of any request sent to the server. This
number should not exceed the same
- * setting defined on the server.
+ * The maximum size in bytes of any response received from the server.
*/
- public Builder maxContentLength(final int maxContentLength) {
- this.maxContentLength = maxContentLength;
+ public Builder maxResponseContentLength(final long
maxResponseContentLength) {
+ this.maxResponseContentLength = maxResponseContentLength;
return this;
}
@@ -884,7 +883,7 @@ public final class Cluster {
connectionPoolSettings.minSize = builder.minConnectionPoolSize;
connectionPoolSettings.maxWaitForConnection =
builder.maxWaitForConnection;
connectionPoolSettings.maxWaitForClose = builder.maxWaitForClose;
- connectionPoolSettings.maxContentLength = builder.maxContentLength;
+ connectionPoolSettings.maxResponseContentLength =
builder.maxResponseContentLength;
connectionPoolSettings.reconnectInterval =
builder.reconnectInterval;
connectionPoolSettings.resultIterationBatchSize =
builder.resultIterationBatchSize;
connectionPoolSettings.enableSsl = builder.enableSsl;
@@ -945,8 +944,8 @@ public final class Cluster {
if (builder.maxWaitForClose < 1)
throw new IllegalArgumentException("maxWaitForClose must be
greater than zero");
- if (builder.maxContentLength < 1)
- throw new IllegalArgumentException("maxContentLength must be
greater than zero");
+ if (builder.maxResponseContentLength < 0)
+ throw new IllegalArgumentException("maxResponseContentLength
must be greater than or equal to zero");
if (builder.reconnectInterval < 1)
throw new IllegalArgumentException("reconnectInterval must be
greater than zero");
diff --git
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java
index 3809af6f5d..78424179d9 100644
---
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java
+++
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java
@@ -46,7 +46,7 @@ import java.util.concurrent.atomic.AtomicReference;
final class Connection {
public static final int MAX_WAIT_FOR_CONNECTION = 16000;
public static final int MAX_WAIT_FOR_CLOSE = 3000;
- public static final int MAX_CONTENT_LENGTH = 10 * 1024 * 1024;
+ public static final long MAX_RESPONSE_CONTENT_LENGTH = Integer.MAX_VALUE;
public static final int RECONNECT_INTERVAL = 1000;
public static final int RESULT_ITERATION_BATCH_SIZE = 64;
public static final long CONNECTION_SETUP_TIMEOUT_MILLIS = 15000;
diff --git
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Settings.java
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Settings.java
index 267cc7f9f6..58933806da 100644
---
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Settings.java
+++
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Settings.java
@@ -194,8 +194,8 @@ public final class Settings {
if (connectionPoolConf.containsKey("maxWaitForClose"))
cpSettings.maxWaitForClose =
connectionPoolConf.getInt("maxWaitForClose");
- if (connectionPoolConf.containsKey("maxContentLength"))
- cpSettings.maxContentLength =
connectionPoolConf.getInt("maxContentLength");
+ if (connectionPoolConf.containsKey("maxResponseContentLength"))
+ cpSettings.maxResponseContentLength =
connectionPoolConf.getInt("maxResponseContentLength");
if (connectionPoolConf.containsKey("reconnectInterval"))
cpSettings.reconnectInterval =
connectionPoolConf.getInt("reconnectInterval");
@@ -316,10 +316,10 @@ public final class Settings {
public int maxWaitForClose = Connection.MAX_WAIT_FOR_CLOSE;
/**
- * The maximum length in bytes that a message can be sent to the
server. This number can be no greater than
- * the setting of the same name in the server configuration. The
default value is 65536.
+ * The maximum length in bytes of a response message that can be
received from the server. The default value is
+ * {@link Integer#MAX_VALUE}.
*/
- public int maxContentLength = Connection.MAX_CONTENT_LENGTH;
+ public long maxResponseContentLength =
Connection.MAX_RESPONSE_CONTENT_LENGTH;
/**
* The amount of time in milliseconds to wait before trying to
reconnect to a dead host. The default value is
diff --git
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/HttpGremlinResponseStreamDecoder.java
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/HttpGremlinResponseStreamDecoder.java
index 9e6b6e79ac..5c8c38edf9 100644
---
a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/HttpGremlinResponseStreamDecoder.java
+++
b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/HttpGremlinResponseStreamDecoder.java
@@ -48,15 +48,15 @@ public class HttpGremlinResponseStreamDecoder extends
MessageToMessageDecoder<De
private static final AttributeKey<Boolean> IS_FIRST_CHUNK =
AttributeKey.valueOf("isFirstChunk");
private static final AttributeKey<HttpResponseStatus> RESPONSE_STATUS =
AttributeKey.valueOf("responseStatus");
private static final AttributeKey<String> RESPONSE_ENCODING =
AttributeKey.valueOf("responseSerializer");
- private static final AttributeKey<Integer> BYTES_READ =
AttributeKey.valueOf("bytesRead");
+ private static final AttributeKey<Long> BYTES_READ =
AttributeKey.valueOf("bytesRead");
private final MessageSerializer<?> serializer;
- private final int maxContentLength;
+ private final long maxResponseContentLength;
private final ObjectMapper mapper = new ObjectMapper();
- public HttpGremlinResponseStreamDecoder(final MessageSerializer<?>
serializer, final int maxContentLength) {
+ public HttpGremlinResponseStreamDecoder(final MessageSerializer<?>
serializer, final long maxResponseContentLength) {
this.serializer = serializer;
- this.maxContentLength = maxContentLength;
+ this.maxResponseContentLength = maxResponseContentLength;
}
@Override
@@ -66,7 +66,7 @@ public class HttpGremlinResponseStreamDecoder extends
MessageToMessageDecoder<De
final Attribute<String> responseEncoding = ((AttributeMap)
ctx).attr(RESPONSE_ENCODING);
if (msg instanceof HttpResponse) {
- ctx.channel().attr(BYTES_READ).set(0);
+ ctx.channel().attr(BYTES_READ).set(0L);
final HttpResponse resp = (HttpResponse) msg;
responseStatus.set(resp.status());
@@ -77,10 +77,10 @@ public class HttpGremlinResponseStreamDecoder extends
MessageToMessageDecoder<De
if (msg instanceof HttpContent) {
ByteBuf content = ((HttpContent) msg).content();
- Attribute<Integer> bytesRead = ctx.channel().attr(BYTES_READ);
+ Attribute<Long> bytesRead = ctx.channel().attr(BYTES_READ);
bytesRead.set(bytesRead.get() + content.readableBytes());
- if (bytesRead.get() > maxContentLength) {
- throw new TooLongFrameException("Response exceeded " +
maxContentLength + " bytes.");
+ if (maxResponseContentLength > 0 && bytesRead.get() >
maxResponseContentLength) {
+ throw new TooLongFrameException("Response exceeded " +
maxResponseContentLength + " bytes.");
}
try {
diff --git
a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ClusterBuilderTest.java
b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ClusterBuilderTest.java
index cecfc9d58f..2ee546d0b0 100644
---
a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ClusterBuilderTest.java
+++
b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ClusterBuilderTest.java
@@ -46,8 +46,7 @@ public class ClusterBuilderTest {
{"maxConnectionPoolSize0",
Cluster.build().maxWaitForConnection(0), "maxWaitForConnection must be greater
than zero"},
{"maxWaitForClose0", Cluster.build().maxWaitForClose(0),
"maxWaitForClose must be greater than zero"},
{"maxWaitForCloseNeg1", Cluster.build().maxWaitForClose(-1),
"maxWaitForClose must be greater than zero"},
- {"maxContentLength0", Cluster.build().maxContentLength(0),
"maxContentLength must be greater than zero"},
- {"maxContentLengthNeg1", Cluster.build().maxContentLength(-1),
"maxContentLength must be greater than zero"},
+ {"maxResponseContentLengthNeg1",
Cluster.build().maxResponseContentLength(-1), "maxResponseContentLength must be
greater than or equal to zero"},
{"reconnectInterval0", Cluster.build().reconnectInterval(0),
"reconnectInterval must be greater than zero"},
{"reconnectIntervalNeg1",
Cluster.build().reconnectInterval(-1), "reconnectInterval must be greater than
zero"},
{"resultIterationBatchSize0",
Cluster.build().resultIterationBatchSize(0), "resultIterationBatchSize must be
greater than zero"},
diff --git
a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/SettingsTest.java
b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/SettingsTest.java
index 8cf697bd0a..42966bf989 100644
---
a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/SettingsTest.java
+++
b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/SettingsTest.java
@@ -63,7 +63,7 @@ public class SettingsTest {
conf.setProperty("connectionPool.maxInProcessPerConnection", 500);
conf.setProperty("connectionPool.minInProcessPerConnection", 600);
conf.setProperty("connectionPool.maxWaitForConnection", 700);
- conf.setProperty("connectionPool.maxContentLength", 800);
+ conf.setProperty("connectionPool.maxResponseContentLength", 800);
conf.setProperty("connectionPool.reconnectInterval", 900);
conf.setProperty("connectionPool.resultIterationBatchSize", 1100);
conf.setProperty("connectionPool.channelizer", "channelizer0");
@@ -95,7 +95,7 @@ public class SettingsTest {
assertEquals(100, settings.connectionPool.minSize);
assertEquals(200, settings.connectionPool.maxSize);
assertEquals(700, settings.connectionPool.maxWaitForConnection);
- assertEquals(800, settings.connectionPool.maxContentLength);
+ assertEquals(800, settings.connectionPool.maxResponseContentLength);
assertEquals(900, settings.connectionPool.reconnectInterval);
assertEquals(15000,
settings.connectionPool.connectionSetupTimeoutMillis);
assertEquals(1100, settings.connectionPool.resultIterationBatchSize);
diff --git
a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/handler/HttpGremlinResponseStreamDecoderTest.java
b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/handler/HttpGremlinResponseStreamDecoderTest.java
new file mode 100644
index 0000000000..f2e7be88b2
--- /dev/null
+++
b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/handler/HttpGremlinResponseStreamDecoderTest.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.driver.handler;
+
+import io.netty.buffer.ByteBuf;
+import io.netty.buffer.ByteBufAllocator;
+import io.netty.channel.embedded.EmbeddedChannel;
+import io.netty.handler.codec.TooLongFrameException;
+import io.netty.handler.codec.http.DefaultFullHttpResponse;
+import io.netty.handler.codec.http.DefaultHttpHeaders;
+import io.netty.handler.codec.http.FullHttpResponse;
+import io.netty.handler.codec.http.HttpObjectAggregator;
+import io.netty.handler.codec.http.HttpResponseStatus;
+import io.netty.handler.codec.http.HttpServerCodec;
+import io.netty.handler.codec.http.HttpVersion;
+import java.util.Collections;
+import org.apache.commons.lang3.RandomStringUtils;
+import org.apache.tinkerpop.gremlin.util.message.ResponseMessage;
+import org.apache.tinkerpop.gremlin.util.ser.SerializationException;
+import org.apache.tinkerpop.gremlin.util.ser.Serializers;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+public class HttpGremlinResponseStreamDecoderTest {
+
+ @Test
+ public void shouldSucceedIfResponseSizeUnderMaxResponseContentLength()
throws SerializationException {
+ final String content = "this response is smaller than the max allowed";
+ final FullHttpResponse httpResponse = createResponse(content);
+ final EmbeddedChannel testChannel =
initializeChannel(httpResponse.content().readableBytes() + 1);
+
+ testChannel.writeInbound(httpResponse);
+ final ResponseMessage inbound = testChannel.readInbound();
+ assertEquals(content, inbound.getResult().getData().get(0));
+ }
+
+ @Test
+ public void shouldSucceedIfResponseSizeEqualToMaxResponseContentLength()
throws SerializationException {
+ final String content = "this response is equal to the max allowed";
+ final FullHttpResponse httpResponse = createResponse(content);
+ final EmbeddedChannel testChannel =
initializeChannel(httpResponse.content().readableBytes());
+
+ testChannel.writeInbound(httpResponse);
+ final ResponseMessage inbound = testChannel.readInbound();
+ assertEquals(content, inbound.getResult().getData().get(0));
+ }
+
+ @Test
+ public void shouldSucceedIfMaxResponseContentLengthZero() throws
SerializationException {
+ final String largeResponse = RandomStringUtils.random(3000);
+ final FullHttpResponse httpResponse = createResponse(largeResponse);
+ final EmbeddedChannel testChannel = initializeChannel(0);
+
+ testChannel.writeInbound(httpResponse);
+ final ResponseMessage inbound = testChannel.readInbound();
+ assertEquals(largeResponse, inbound.getResult().getData().get(0));
+ }
+
+ @Test
+ public void shouldThrowIfResponseSizeLargerThanMaxResponseContentLength()
throws SerializationException {
+ final FullHttpResponse httpResponse = createResponse("this response is
larger than the max allowed");
+ final EmbeddedChannel testChannel =
initializeChannel(httpResponse.content().readableBytes() - 1);
+
+ try {
+ testChannel.writeInbound(httpResponse);
+ fail("Expected TooLongFrameException");
+ } catch (TooLongFrameException e) {
+ assertEquals("Response exceeded 59 bytes.", e.getMessage());
+ }
+ }
+
+ private FullHttpResponse createResponse(String content) throws
SerializationException {
+ final ResponseMessage response =
ResponseMessage.build().code(HttpResponseStatus.OK).result(Collections.singletonList(content)).create();
+ final ByteBuf buffer =
Serializers.GRAPHBINARY_V4.simpleInstance().serializeResponseAsBinary(response,
ByteBufAllocator.DEFAULT);
+ return new DefaultFullHttpResponse(HttpVersion.HTTP_1_1,
HttpResponseStatus.OK, buffer, new DefaultHttpHeaders(), new
DefaultHttpHeaders());
+ }
+
+ private EmbeddedChannel initializeChannel(final long
maxResponseContentLength) {
+ final HttpGremlinResponseStreamDecoder decoder = new
HttpGremlinResponseStreamDecoder(Serializers.GRAPHBINARY_V4.simpleInstance(),
maxResponseContentLength);
+ final EmbeddedChannel testChannel = new EmbeddedChannel(new
HttpServerCodec(), new HttpObjectAggregator(Integer.MAX_VALUE), decoder);
+ return testChannel;
+ }
+
+}
\ No newline at end of file
diff --git a/gremlin-server/conf/gremlin-server-classic.yaml
b/gremlin-server/conf/gremlin-server-classic.yaml
index 58429c24e8..c27d3c6433 100644
--- a/gremlin-server/conf/gremlin-server-classic.yaml
+++ b/gremlin-server/conf/gremlin-server-classic.yaml
@@ -38,6 +38,6 @@ keepAliveInterval: 0
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
-maxContentLength: 10485760
+maxRequestContentLength: 10485760
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
diff --git a/gremlin-server/conf/gremlin-server-modern-readonly.yaml
b/gremlin-server/conf/gremlin-server-modern-readonly.yaml
index de0a84ab2d..032359eb8d 100644
--- a/gremlin-server/conf/gremlin-server-modern-readonly.yaml
+++ b/gremlin-server/conf/gremlin-server-modern-readonly.yaml
@@ -38,6 +38,6 @@ keepAliveInterval: 0
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
-maxContentLength: 10485760
+maxRequestContentLength: 10485760
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
diff --git a/gremlin-server/conf/gremlin-server-modern.yaml
b/gremlin-server/conf/gremlin-server-modern.yaml
index 89e498850f..3e8ab32aba 100644
--- a/gremlin-server/conf/gremlin-server-modern.yaml
+++ b/gremlin-server/conf/gremlin-server-modern.yaml
@@ -39,7 +39,7 @@ keepAliveInterval: 0
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
-maxContentLength: 10485760
+maxRequestContentLength: 10485760
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
writeBufferLowWaterMark: 32768
diff --git a/gremlin-server/conf/gremlin-server-neo4j.yaml
b/gremlin-server/conf/gremlin-server-neo4j.yaml
index 7082b999d0..78801de4d0 100644
--- a/gremlin-server/conf/gremlin-server-neo4j.yaml
+++ b/gremlin-server/conf/gremlin-server-neo4j.yaml
@@ -52,7 +52,7 @@ keepAliveInterval: 0
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
-maxContentLength: 10485760
+maxRequestContentLength: 10485760
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
writeBufferLowWaterMark: 32768
diff --git a/gremlin-server/conf/gremlin-server-rest-modern.yaml
b/gremlin-server/conf/gremlin-server-rest-modern.yaml
index 5da2f36cc9..8cd1e76c13 100644
--- a/gremlin-server/conf/gremlin-server-rest-modern.yaml
+++ b/gremlin-server/conf/gremlin-server-rest-modern.yaml
@@ -38,6 +38,6 @@ strictTransactionManagement: false
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
-maxContentLength: 10485760
+maxRequestContentLength: 10485760
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
diff --git a/gremlin-server/conf/gremlin-server-rest-secure.yaml
b/gremlin-server/conf/gremlin-server-rest-secure.yaml
index 50a6cd405d..c047ba43b2 100644
--- a/gremlin-server/conf/gremlin-server-rest-secure.yaml
+++ b/gremlin-server/conf/gremlin-server-rest-secure.yaml
@@ -47,7 +47,7 @@ strictTransactionManagement: false
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
-maxContentLength: 10485760
+maxRequestContentLength: 10485760
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
writeBufferLowWaterMark: 32768
diff --git a/gremlin-server/conf/gremlin-server-secure.yaml
b/gremlin-server/conf/gremlin-server-secure.yaml
index 6f16eb67ba..499fcd8904 100644
--- a/gremlin-server/conf/gremlin-server-secure.yaml
+++ b/gremlin-server/conf/gremlin-server-secure.yaml
@@ -51,7 +51,7 @@ keepAliveInterval: 0
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
-maxContentLength: 10485760
+maxRequestContentLength: 10485760
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
writeBufferLowWaterMark: 32768
diff --git a/gremlin-server/conf/gremlin-server-spark.yaml
b/gremlin-server/conf/gremlin-server-spark.yaml
index 43fbc19533..138c8bbc47 100644
--- a/gremlin-server/conf/gremlin-server-spark.yaml
+++ b/gremlin-server/conf/gremlin-server-spark.yaml
@@ -65,7 +65,7 @@ keepAliveInterval: 0
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
-maxContentLength: 10485760
+maxRequestContentLength: 10485760
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
writeBufferLowWaterMark: 32768
diff --git a/gremlin-server/conf/gremlin-server-transaction.yaml
b/gremlin-server/conf/gremlin-server-transaction.yaml
index 2afa7f4b7c..52359e5521 100644
--- a/gremlin-server/conf/gremlin-server-transaction.yaml
+++ b/gremlin-server/conf/gremlin-server-transaction.yaml
@@ -42,7 +42,7 @@ keepAliveInterval: 0
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
-maxContentLength: 10485760
+maxRequestContentLength: 10485760
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
writeBufferLowWaterMark: 32768
diff --git a/gremlin-server/conf/gremlin-server.yaml
b/gremlin-server/conf/gremlin-server.yaml
index 88f56b9d91..08650bd092 100644
--- a/gremlin-server/conf/gremlin-server.yaml
+++ b/gremlin-server/conf/gremlin-server.yaml
@@ -42,7 +42,7 @@ keepAliveInterval: 0
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
-maxContentLength: 10485760
+maxRequestContentLength: 10485760
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
writeBufferLowWaterMark: 32768
diff --git
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java
index b939bce20b..ceffc1e576 100644
---
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java
+++
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java
@@ -135,12 +135,11 @@ public class Settings {
public int maxChunkSize = 8192;
/**
- * The maximum length of the aggregated content for a message. Works in
concert with {@link #maxChunkSize} where
+ * The maximum length of the aggregated content for a request message.
Works in concert with {@link #maxChunkSize} where
* chunked requests are accumulated back into a single message. A request
exceeding this size will
- * return a 413 - Request Entity Too Large status code. A response
exceeding this size will raise an internal
- * exception.
+ * return a 413 - Request Entity Too Large status code.
*/
- public int maxContentLength = 1024 * 1024 * 10;
+ public int maxRequestContentLength = 1024 * 1024 * 10;
/**
* Maximum number of request components that can be aggregated for a
message.
diff --git
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/HttpChannelizer.java
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/HttpChannelizer.java
index df39cd5ba9..5b8a66505c 100644
---
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/HttpChannelizer.java
+++
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/channel/HttpChannelizer.java
@@ -78,7 +78,7 @@ public class HttpChannelizer extends AbstractChannelizer {
pipeline.addLast("http-keepalive-handler", new
HttpServerKeepAliveHandler());
pipeline.addLast("http-cors-handler", new
CorsHandler(CorsConfigBuilder.forAnyOrigin().build()));
- final HttpObjectAggregator aggregator = new
HttpObjectAggregator(settings.maxContentLength);
+ final HttpObjectAggregator aggregator = new
HttpObjectAggregator(settings.maxRequestContentLength);
aggregator.setMaxCumulationBufferComponents(settings.maxAccumulationBufferComponents);
pipeline.addLast(PIPELINE_HTTP_AGGREGATOR, aggregator);
pipeline.addLast("http-request-checker", httpRequestCheckingHandler);
diff --git
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/GremlinError.java
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/GremlinError.java
index f0f298aa1b..3a8051dc64 100644
---
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/GremlinError.java
+++
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/util/GremlinError.java
@@ -115,7 +115,7 @@ public class GremlinError {
}
public static GremlinError longFrame(Throwable t) {
- final String message = t.getMessage() + " - increase the
maxContentLength";
+ final String message = t.getMessage() + " - increase the
maxRequestContentLength";
// todo: ResponseEntityTooLargeException? !!!
return new GremlinError(HttpResponseStatus.REQUEST_ENTITY_TOO_LARGE,
message, "RequestEntityTooLargeException");
}
diff --git
a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/driver/ClientConnectionIntegrateTest.java
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/driver/ClientConnectionIntegrateTest.java
index 39f89e877c..f780bba564 100644
---
a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/driver/ClientConnectionIntegrateTest.java
+++
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/driver/ClientConnectionIntegrateTest.java
@@ -94,16 +94,16 @@ public class ClientConnectionIntegrateTest extends
AbstractGremlinServerIntegrat
*/
@Test
public void shouldCloseConnectionDeadDueToUnRecoverableError() throws
Exception {
- // Set a low value of maxContentLength to intentionally trigger
CorruptedFrameException
+ // Set a low value of maxResponseContentLength to intentionally
trigger CorruptedFrameException
final Cluster cluster = TestClientFactory.build()
- .maxContentLength(64)
+ .maxResponseContentLength(64)
.minConnectionPoolSize(1)
.maxConnectionPoolSize(2)
.create();
final Client.ClusteredClient client = cluster.connect();
try {
- // Add the test data so that the g.V() response could exceed
maxContentLength
+ // Add the test data so that the g.V() response could exceed
maxResponseContentLength
client.submit("g.inject(1).repeat(__.addV()).times(20).count()").all().get();
try {
client.submit("g.V().fold()").all().get();
diff --git
a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/driver/remote/AbstractRemoteGraphProvider.java
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/driver/remote/AbstractRemoteGraphProvider.java
index 9d41d393d8..aea52aaa56 100644
---
a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/driver/remote/AbstractRemoteGraphProvider.java
+++
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/driver/remote/AbstractRemoteGraphProvider.java
@@ -334,7 +334,7 @@ public abstract class AbstractRemoteGraphProvider extends
AbstractGraphProvider
public static Cluster.Builder createClusterBuilder(final Serializers
serializer) {
// bigger buffer for some tests
- return
TestClientFactory.build().maxContentLength(10_000_000).serializer(serializer);
+ return
TestClientFactory.build().maxResponseContentLength(10_000_000).serializer(serializer);
}
public static void startServer() throws Exception {
@@ -342,7 +342,7 @@ public abstract class AbstractRemoteGraphProvider extends
AbstractGraphProvider
final Settings settings = Settings.read(stream);
ServerTestHelper.rewritePathsInGremlinServerSettings(settings);
- settings.maxContentLength = 1024000;
+ settings.maxRequestContentLength = 1024000;
settings.maxChunkSize = 1024000;
server = new GremlinServer(settings);
diff --git
a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
index 904407a6d9..a191146924 100644
---
a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
+++
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java
@@ -267,7 +267,7 @@ public class GremlinDriverIntegrateTest extends
AbstractGremlinServerIntegration
public void shouldEventuallySucceedAfterChannelLevelError() {
final Cluster cluster = TestClientFactory.build()
.reconnectInterval(500)
- .maxContentLength(64).create();
+ .maxResponseContentLength(64).create();
final Client client = cluster.connect();
try {
@@ -748,7 +748,7 @@ public class GremlinDriverIntegrateTest extends
AbstractGremlinServerIntegration
@Test
public void shouldFailClientSideWithTooLargeAResponse() {
- final Cluster cluster =
TestClientFactory.build().maxContentLength(1).create();
+ final Cluster cluster =
TestClientFactory.build().maxResponseContentLength(1).create();
final Client client = cluster.connect();
try {
@@ -763,6 +763,19 @@ public class GremlinDriverIntegrateTest extends
AbstractGremlinServerIntegration
}
}
+ @Test
+ public void
shouldSucceedClientSideWithLargeResponseIfMaxResponseContentLengthZero() throws
Exception {
+ final Cluster cluster =
TestClientFactory.build().maxResponseContentLength(0).create();
+ final Client client = cluster.connect();
+
+ try {
+ final String fatty = IntStream.range(0,
10000).mapToObj(String::valueOf).collect(Collectors.joining());
+ assertEquals(fatty, client.submit("'" + fatty +
"'").all().get().get(0).getString());
+ } finally {
+ cluster.close();
+ }
+ }
+
@Test
public void shouldNotThrowNoSuchElementException() throws Exception {
final Cluster cluster = TestClientFactory.open();
diff --git
a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerHttpIntegrateTest.java
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerHttpIntegrateTest.java
index bf3aa20adf..1aa01b9156 100644
---
a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerHttpIntegrateTest.java
+++
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerHttpIntegrateTest.java
@@ -107,7 +107,7 @@ public class GremlinServerHttpIntegrateTest extends
AbstractGremlinServerIntegra
final String nameOfTest = name.getMethodName();
switch (nameOfTest) {
case "should413OnPostWithResultTooLarge":
- settings.maxContentLength = 31;
+ settings.maxRequestContentLength = 31;
break;
case "should200OnPOSTTransactionalGraph":
useTinkerTransactionGraph(settings);
diff --git
a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
index af5228945e..3a207069f2 100644
---
a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
+++
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
@@ -136,7 +136,7 @@ public class GremlinServerIntegrateTest extends
AbstractGremlinServerIntegration
final String nameOfTest = name.getMethodName();
switch (nameOfTest) {
case "shouldProvideBetterExceptionForMethodCodeTooLarge":
- settings.maxContentLength = 4096000;
+ settings.maxRequestContentLength = 4096000;
settings.maxParameters = Integer.MAX_VALUE;
break;
case "shouldRespectHighWaterMarkSettingAndSucceed":
@@ -147,7 +147,7 @@ public class GremlinServerIntegrateTest extends
AbstractGremlinServerIntegration
settings.evaluationTimeout = 1000;
break;
case "shouldBlockRequestWhenTooBig":
- settings.maxContentLength = 1024;
+ settings.maxRequestContentLength = 1024;
break;
case "shouldBatchResultsByTwos":
case "shouldBatchResultsByTwosToDriver":
@@ -895,7 +895,7 @@ public class GremlinServerIntegrateTest extends
AbstractGremlinServerIntegration
b.put("x" + ix, ix);
}
- final Cluster cluster =
TestClientFactory.build().maxContentLength(4096000).create();
+ final Cluster cluster =
TestClientFactory.build().maxResponseContentLength(4096000).create();
final Client client = cluster.connect();
try {
diff --git
a/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-integration.yaml
b/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-integration.yaml
index 6716068ead..13a1c6ffdb 100644
---
a/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-integration.yaml
+++
b/gremlin-server/src/test/resources/org/apache/tinkerpop/gremlin/server/gremlin-server-integration.yaml
@@ -66,7 +66,7 @@ keepAliveInterval: 0
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
-maxContentLength: 10485760
+maxRequestContentLength: 10485760
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
writeBufferLowWaterMark: 32768