Skip to content

Commit

Permalink
Use correct key for Request.maxFormContentSize
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Jun 5, 2023
1 parent 690bb69 commit 3d864ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/org/jvnet/hudson/test/HudsonTestCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
import org.eclipse.jetty.server.HttpConnectionFactory;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.handler.ContextHandler;
import org.eclipse.jetty.util.security.Password;
import org.eclipse.jetty.util.thread.QueuedThreadPool;
import org.eclipse.jetty.webapp.Configuration;
Expand Down Expand Up @@ -1754,7 +1755,7 @@ public boolean isLoggable(LogRecord record) {
});

// remove the upper bound of the POST data size in Jetty.
System.setProperty("org.mortbay.jetty.Request.maxFormContentSize","-1");
System.setProperty(ContextHandler.MAX_FORM_CONTENT_SIZE_KEY, "-1");
}

private static final Logger LOGGER = Logger.getLogger(HudsonTestCase.class.getName());
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jvnet/hudson/test/JenkinsRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@
import org.eclipse.jetty.server.HttpConnectionFactory;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.handler.ContextHandler;
import org.eclipse.jetty.util.security.Password;
import org.eclipse.jetty.util.thread.QueuedThreadPool;
import org.eclipse.jetty.webapp.Configuration;
Expand Down Expand Up @@ -2863,7 +2864,7 @@ public boolean isLoggable(LogRecord record) {
});

// remove the upper bound of the POST data size in Jetty.
System.setProperty("org.mortbay.jetty.Request.maxFormContentSize","-1");
System.setProperty(ContextHandler.MAX_FORM_CONTENT_SIZE_KEY, "-1");
}

private static final Logger LOGGER = Logger.getLogger(HudsonTestCase.class.getName());
Expand Down

0 comments on commit 3d864ed

Please sign in to comment.