Skip to content

Commit ba51ab7

Browse files
committed
copy, remove validation.
1 parent b287d4c commit ba51ab7

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

src/main/java/io/fusionauth/http/server/HTTPServer.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,6 @@ public HTTPServer start() {
8383
return this;
8484
}
8585

86-
// On server start-up, validate inter-dependant configuration options.
87-
int maxRequestBodySize = configuration.getMaxRequestBodySize();
88-
int maxFormDataSize = configuration.getMaxFormDataSize();
89-
long maxMultipartRequestSize = configuration.getMultipartConfiguration().getMaxRequestSize();
90-
if (maxRequestBodySize != -1) {
91-
// The user may disable maxFormDataSize or maxMultipartRequestSize by setting them to -1, that is ok. In this case, maxRequestBodySize will still be enforced.
92-
if (maxRequestBodySize < maxFormDataSize || maxRequestBodySize < maxMultipartRequestSize ) {
93-
logger.error("Unable to start the HTTP server because the configuration is invalid. The [maxRequestBodySize] configuration is intended as a fail-safe, and must be greater than or equal to [maxFormDataSize] and [multipartStreamConfiguration.maxRequestSize].");
94-
return this;
95-
}
96-
}
97-
9886
// Set up the server logger and the static loggers
9987
logger = configuration.getLoggerFactory().getLogger(HTTPServer.class);
10088
HTTPTools.initialize(configuration().getLoggerFactory());

src/main/java/io/fusionauth/http/server/HTTPServerConfiguration.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ public int getMaxBytesToDrain() {
188188
}
189189

190190
/**
191-
*
192191
* @return the maximum size of the HTTP request body in bytes when the HTTP server process a Content-Type of
193192
* application/x-www-form-urlencoded. Defaults to 10 Megabytes.
194193
*/
@@ -212,9 +211,8 @@ public int getMaxPendingSocketConnections() {
212211
/**
213212
* The maximum size in bytes of the HTTP request body. This configuration excludes the size of the HTTP request header.
214213
* <p>
215-
* This configuration will affect all requests regardless of Content-Type. Practically this means this value must be greater than or equal
216-
* to the larger of the two values configured by {@link #getMaxFormDataSize()} or {@link MultipartConfiguration#getMaxRequestSize()}. This
217-
* configuration is intended to be a fail-safe for unexpected large requests.
214+
* This configuration will affect all requests regardless of Content-Type and is intended to be a fail-safe for unexpected large
215+
* requests.
218216
*
219217
* @return the maximum size in bytes of the HTTP request body. Defaults to 128 Megabytes.
220218
*/
@@ -595,6 +593,8 @@ public HTTPServerConfiguration withMultipartBufferSize(int multipartBufferSize)
595593
return this;
596594
}
597595

596+
// TODO : Review coments for constraints for multi-part, etc.
597+
598598
@Override
599599
public HTTPServerConfiguration withMultipartConfiguration(MultipartConfiguration multipartStreamConfiguration) {
600600
Objects.requireNonNull(multipartStreamConfiguration, "You cannot set the multipart stream configuration to null");

0 commit comments

Comments
 (0)