Skip to content

Commit

Permalink
Set maximum parameter count to 10,000 to match the documentation (#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Jun 26, 2024
1 parent 0bedfa0 commit 7dd2180
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/main/java/winstone/HostConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,7 @@ public void preConfigure() throws Exception {
} finally {
t.setContextClassLoader(ccl);
}
int maxParameterCount = Option.MAX_PARAM_COUNT.get(args);
if (maxParameterCount > 0) {
setMaxFormKeys(maxParameterCount);
}
setMaxFormKeys(Option.MAX_PARAM_COUNT.get(args));
setMaxFormContentSize(Option.REQUEST_FORM_CONTENT_SIZE.get(args));
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/winstone/cmdline/Option.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public static List<Option<?>> all(Class<?> clazz) {

public static final OCompression COMPRESSION = new OCompression("compression", CompressionScheme.GZIP);
public static final OString MIME_TYPES = string("mimeTypes");
public static final OInt MAX_PARAM_COUNT = integer("maxParamCount", -1);
public static final OInt MAX_PARAM_COUNT = integer("maxParamCount", 10000);
public static final OBoolean USAGE = bool("usage", false);
public static final OInt SESSION_TIMEOUT = integer("sessionTimeout", -1);
public static final OInt SESSION_EVICTION = integer("sessionEviction", 1800);
Expand Down

0 comments on commit 7dd2180

Please sign in to comment.