Comment/TODO updates for Jetty 12.0.x from review with @gregw

This commit is contained in:
Joakim Erdfelt 2022-07-24 21:31:30 -05:00
parent 0dd2ab6229
commit ba4405e05b
No known key found for this signature in database
GPG Key ID: 2D0E1FB8FE4B68B4
3 changed files with 6 additions and 2 deletions

View File

@ -443,6 +443,7 @@ public class ResourceService
}
case SERVE ->
{
// TODO : check conditional headers.
// TODO output buffer size????
HttpContent c = _contentFactory.getContent(welcomeAction.target, 16 * 1024);
sendData(request, response, callback, c, null);

View File

@ -3261,7 +3261,7 @@ public class ResourceHandlerTest
ContextHandler altContext = new ContextHandler("/context/alt");
altContext.setHandler(altResourceHandler);
_contextHandlerCollection.addHandler(altContext);
altContext.start(); // TODO: do we really need to start this on our own?
altContext.start(); // Correct behavior, after ContextHandlerCollection is started, it's on us to start the handler.
ResourceHandler otherResourceHandler = new ResourceHandler();
otherResourceHandler.setBaseResource(Resource.newResource(altRoot));
@ -3271,7 +3271,7 @@ public class ResourceHandlerTest
ContextHandler otherContext = new ContextHandler("/context/other");
otherContext.setHandler(otherResourceHandler);
_contextHandlerCollection.addHandler(otherContext);
otherContext.start(); // TODO: do we really need to start this on our own?
otherContext.start(); // Correct behavior, after ContextHandlerCollection is started, it's on us to start the handler.
_rootResourceHandler.setDirAllowed(false);
_rootResourceHandler.setRedirectWelcome(false);

View File

@ -2938,6 +2938,9 @@ public class ServletContextHandler extends ContextHandler implements Graceful
@Override
public ServletContext getContext(String uripath)
{
// TODO: should we throw UnsupportedOperationException here?
// This is a change in API from Jetty 10 and Jetty 11, as the older Jetty versions goes down to ContextHandler.
// Also, how do we handle cross context across EE environments?
List<ServletContextHandler> contexts = new ArrayList<>();
List<ServletContextHandler> handlers = getServer().getDescendants(ServletContextHandler.class);
String matchedPath = null;