diff --git a/demos/demo-jetty-webapp/src/main/webapp/WEB-INF/web.xml b/demos/demo-jetty-webapp/src/main/webapp/WEB-INF/web.xml index 615a3775211..b610408e0da 100644 --- a/demos/demo-jetty-webapp/src/main/webapp/WEB-INF/web.xml +++ b/demos/demo-jetty-webapp/src/main/webapp/WEB-INF/web.xml @@ -121,18 +121,6 @@ /dispatch/* - - CGI - org.eclipse.jetty.servlets.CGI - 1 - true - - - - CGI - /cgi-bin/* - - Chat com.acme.ChatServlet diff --git a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpExchangeDelegate.java b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpExchangeDelegate.java index 33d0f68869f..48de184c007 100644 --- a/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpExchangeDelegate.java +++ b/jetty-http-spi/src/main/java/org/eclipse/jetty/http/spi/JettyHttpExchangeDelegate.java @@ -209,8 +209,11 @@ public class JettyHttpExchangeDelegate extends HttpExchange @Override public void setStreams(InputStream i, OutputStream o) { - _is = i; - _os = o; + assert _is != null; + if (i != null) + _is = i; + if (o != null) + _os = o; } @Override diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java b/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java index 2b89d7befa0..ad35aa2f388 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java @@ -139,6 +139,23 @@ public abstract class SelectorManager extends ContainerLifeCycle implements Dump executor.execute(task); } + /** + * Get total number of keys from each selector. + * + * @return total number of selector keys + */ + @ManagedAttribute(value = "Total number of keys in all selectors", readonly = true) + public int getTotalKeys() + { + int keys = 0; + for (final ManagedSelector selector : _selectors) + { + keys += selector.getTotalKeys(); + } + return keys; + } + + /** * @return the number of selectors in use */ @@ -506,4 +523,10 @@ public abstract class SelectorManager extends ContainerLifeCycle implements Dump { } } + + @Override + public String toString() + { + return String.format("%s@%x[keys=%d]", getClass().getSimpleName(), hashCode(), getTotalKeys()); + } } diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/CGI.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/CGI.java index 4ce419b4e78..34ad3d6434c 100644 --- a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/CGI.java +++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/CGI.java @@ -62,7 +62,10 @@ import org.slf4j.LoggerFactory; *
ignoreExitState
*
If true then do not act on a non-zero exec exit status")
* + * + * @deprecated do not use, no replacement, will be removed in a future release. */ +@Deprecated(forRemoval = true) public class CGI extends HttpServlet { private static final long serialVersionUID = -6182088932884791074L;