-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jetty 10 based JenkinsRule
#453
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -203,7 +203,9 @@ | |
import org.apache.commons.io.FileUtils; | ||
import org.apache.commons.io.IOUtils; | ||
import org.apache.commons.lang3.tuple.ImmutablePair; | ||
import org.eclipse.jetty.http.HttpCompliance; | ||
import org.eclipse.jetty.http.MimeTypes; | ||
import org.eclipse.jetty.http.UriCompliance; | ||
import org.eclipse.jetty.security.HashLoginService; | ||
import org.eclipse.jetty.security.LoginService; | ||
import org.eclipse.jetty.security.UserStore; | ||
|
@@ -216,6 +218,7 @@ | |
import org.eclipse.jetty.webapp.Configuration; | ||
import org.eclipse.jetty.webapp.WebAppContext; | ||
import org.eclipse.jetty.webapp.WebXmlConfiguration; | ||
import org.eclipse.jetty.websocket.server.config.JettyWebSocketServletContainerInitializer; | ||
import static org.hamcrest.MatcherAssert.assertThat; | ||
import static org.hamcrest.Matchers.containsString; | ||
import static org.hamcrest.Matchers.is; | ||
|
@@ -796,6 +799,7 @@ public static ImmutablePair<Server, ServletContext> _createWebServer(String cont | |
context.setConfigurations(new Configuration[]{new WebXmlConfiguration()}); | ||
context.addBean(new NoListenerConfiguration(context)); | ||
server.setHandler(context); | ||
JettyWebSocketServletContainerInitializer.configure(context, null); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @basil FYI this JTH release breaks a WebSocket test in the
I am still trying to understand why; in the meantime, jenkinsci/kubernetes-plugin@dcc8137 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, never mind, I think this is due to a stale copy in that plugin (#289 (comment)). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Glad to hear it, especially given that I tested this case by running the Swarm plugin's |
||
context.setMimeTypes(MIME_TYPES); | ||
context.getSecurityHandler().setLoginService(loginServiceSupplier.get()); | ||
context.setResourceBase(WarExploder.getExplodedDir().getPath()); | ||
|
@@ -804,6 +808,8 @@ public static ImmutablePair<Server, ServletContext> _createWebServer(String cont | |
HttpConfiguration config = connector.getConnectionFactory(HttpConnectionFactory.class).getHttpConfiguration(); | ||
// use a bigger buffer as Stapler traces can get pretty large on deeply nested URL | ||
config.setRequestHeaderSize(12 * 1024); | ||
config.setHttpCompliance(HttpCompliance.RFC7230); | ||
config.setUriCompliance(UriCompliance.LEGACY); | ||
connector.setHost("localhost"); | ||
if (System.getProperty("port") != null) { | ||
connector.setPort(Integer.parseInt(System.getProperty("port"))); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jenkinsci/jenkins#6785 (comment) FTR