diff --git a/VERSION.txt b/VERSION.txt index aab62769741..faf87fbf5b7 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,5 +1,6 @@ jetty-9.3.0-SNAPSHOT + jetty-9.2.11.M0 - 25 March 2015 + 454934 WebSocketClient / connectToServer can block indefinitely during upgrade failure diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpMethod.java b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpMethod.java index 0dd075328f2..7904932637b 100644 --- a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpMethod.java +++ b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpMethod.java @@ -76,7 +76,7 @@ public enum HttpMethod return HEAD; break; case 'O': - if (bytes[position+1]=='O' && bytes[position+2]=='T' && bytes[position+3]=='I' && length>=8 && + if (bytes[position+1]=='P' && bytes[position+2]=='T' && bytes[position+3]=='I' && length>=8 && bytes[position+4]=='O' && bytes[position+5]=='N' && bytes[position+6]=='S' && bytes[position+7]==' ' ) return OPTIONS; break; diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyEffectiveWebXml.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyEffectiveWebXml.java index 3b3883077fc..7d454444c4e 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyEffectiveWebXml.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyEffectiveWebXml.java @@ -71,8 +71,7 @@ public class JettyEffectiveWebXml extends JettyRunMojo @Override public void startJetty() throws MojoExecutionException { - //Only do enough setup to be able to produce a quickstart-web.xml file to - //pass onto the forked process to run + //Only do enough setup to be able to produce a quickstart-web.xml file //if the user didn't nominate a file to generate into, pick the name and //make sure that it is deleted on exit diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunForkedMojo.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunForkedMojo.java index be33e9bf1bb..b6a1e4456e5 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunForkedMojo.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyRunForkedMojo.java @@ -146,6 +146,7 @@ public class JettyRunForkedMojo extends JettyRunMojo private Resource originalBaseResource; + private boolean originalPersistTemp; /** @@ -253,6 +254,9 @@ public class JettyRunForkedMojo extends JettyRunMojo //copy the base resource as configured by the plugin originalBaseResource = webApp.getBaseResource(); + //get the original persistance setting + originalPersistTemp = webApp.isPersistTempDirectory(); + //set the webapp up to do very little other than generate the quickstart-web.xml webApp.setCopyWebDir(false); webApp.setCopyWebInf(false); @@ -275,8 +279,11 @@ public class JettyRunForkedMojo extends JettyRunMojo tpool.start(); else webApp.setAttribute(AnnotationConfiguration.MULTI_THREADED, Boolean.FALSE.toString()); + + //leave everything unpacked for the forked process to use + webApp.setPersistTempDirectory(true); - webApp.start(); //just enough to generate the quickstart + webApp.start(); //just enough to generate the quickstart //save config of the webapp BEFORE we stop File props = prepareConfiguration(); @@ -470,31 +477,23 @@ public class JettyRunForkedMojo extends JettyRunMojo //tmp dir props.put("tmp.dir", webApp.getTempDirectory().getAbsolutePath()); - props.put("tmp.dir.persist", Boolean.toString(webApp.isPersistTempDirectory())); + props.put("tmp.dir.persist", Boolean.toString(originalPersistTemp)); + + //send over the original base resources before any overlays were added + if (originalBaseResource instanceof ResourceCollection) + props.put("base.dirs.orig", toCSV(((ResourceCollection)originalBaseResource).getResources())); + else + props.put("base.dirs.orig", originalBaseResource.toString()); + + //send over the calculated resource bases that includes unpacked overlays, but none of the + //meta-inf resources + Resource postOverlayResources = (Resource)webApp.getAttribute(MavenWebInfConfiguration.RESOURCE_BASES_POST_OVERLAY); + if (postOverlayResources instanceof ResourceCollection) + props.put("base.dirs", toCSV(((ResourceCollection)postOverlayResources).getResources())); + else + props.put("base.dirs", postOverlayResources.toString()); + - //resource bases - these are what has been configured BEFORE the webapp started and - //potentially reordered them and included any resources from META-INF - if (originalBaseResource != null) - { - StringBuffer rb = new StringBuffer(); - if (originalBaseResource instanceof ResourceCollection) - { - ResourceCollection resources = ((ResourceCollection)originalBaseResource); - for (Resource r:resources.getResources()) - { - if (rb.length() > 0) rb.append(","); - rb.append(r.toString()); - } - } - else - rb.append(originalBaseResource.toString()); - - props.put("base.dirs", rb.toString()); - } - - //sort out the resource base directories of the webapp - props.put("base.first", Boolean.toString(webApp.getBaseAppFirst())); - //web-inf classes if (webApp.getClasses() != null) { @@ -751,4 +750,17 @@ public class JettyRunForkedMojo extends JettyRunMojo } return strbuff.toString(); } + + private String toCSV (Resource[] resources) + { + StringBuffer rb = new StringBuffer(); + + for (Resource r:resources) + { + if (rb.length() > 0) rb.append(","); + rb.append(r.toString()); + } + + return rb.toString(); + } } diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenQuickStartConfiguration.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenQuickStartConfiguration.java index 5375b515af8..c0212dc293a 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenQuickStartConfiguration.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenQuickStartConfiguration.java @@ -23,9 +23,11 @@ import java.io.File; import java.util.Iterator; import org.eclipse.jetty.quickstart.QuickStartConfiguration; +import org.eclipse.jetty.util.IO; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; import org.eclipse.jetty.util.resource.Resource; +import org.eclipse.jetty.util.resource.ResourceCollection; import org.eclipse.jetty.webapp.WebAppClassLoader; import org.eclipse.jetty.webapp.WebAppContext; @@ -54,6 +56,20 @@ public class MavenQuickStartConfiguration extends QuickStartConfiguration return _quickStartWebXml; } + @Override + public void preConfigure(WebAppContext context) throws Exception + { + //check that webapp is suitable for quick start + if (context.getBaseResource() == null) + throw new IllegalStateException ("No location for webapp"); + + + //look for quickstart-web.xml in WEB-INF of webapp + Resource quickStartWebXml = getQuickStartWebXml(context); + LOG.debug("quickStartWebXml={}",quickStartWebXml); + + context.getMetaData().setWebXml(quickStartWebXml); + } @Override @@ -89,4 +105,28 @@ public class MavenQuickStartConfiguration extends QuickStartConfiguration context.setServerClasses( newServerClasses ); } + @Override + public void deconfigure(WebAppContext context) throws Exception + { + //if we're not persisting the temp dir, get rid of any overlays + if (!context.isPersistTempDirectory()) + { + Resource originalBases = (Resource)context.getAttribute("org.eclipse.jetty.resources.originalBases"); + String originalBaseStr = originalBases.toString(); + + //Iterate over all of the resource bases and ignore any that were original bases, just + //deleting the overlays + Resource res = context.getBaseResource(); + if (res instanceof ResourceCollection) + { + for (Resource r:((ResourceCollection)res).getResources()) + { + if (originalBaseStr.contains(r.toString())) + continue; + IO.delete(r.getFile()); + } + } + } + } + } diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenWebInfConfiguration.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenWebInfConfiguration.java index 95803f6a552..578e15a39ce 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenWebInfConfiguration.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/MavenWebInfConfiguration.java @@ -25,7 +25,7 @@ import java.util.Iterator; import java.util.List; import java.util.Locale; -import org.eclipse.jetty.util.IO; + import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; import org.eclipse.jetty.util.resource.Resource; @@ -46,7 +46,7 @@ public class MavenWebInfConfiguration extends WebInfConfiguration { private static final Logger LOG = Log.getLogger(MavenWebInfConfiguration.class); - + public static final String RESOURCE_BASES_POST_OVERLAY = "org.eclipse.jetty.resource.postOverlay"; protected static int COUNTER = 0; protected Resource _originalResourceBase; protected List _unpackedOverlayResources; @@ -115,24 +115,11 @@ public class MavenWebInfConfiguration extends WebInfConfiguration */ public void deconfigure(WebAppContext context) throws Exception { - //remove the unpacked wars - if (_unpackedOverlayResources != null && !_unpackedOverlayResources.isEmpty()) - { - try - { - for (Resource r:_unpackedOverlayResources) - { - IO.delete(r.getFile()); - } - } - catch (IOException e) - { - LOG.ignore(e); - } - } super.deconfigure(context); //restore whatever the base resource was before we might have included overlaid wars context.setBaseResource(_originalResourceBase); + //undo the setting of the overlayed resources + context.removeAttribute(RESOURCE_BASES_POST_OVERLAY); } @@ -190,9 +177,10 @@ public class MavenWebInfConfiguration extends WebInfConfiguration resourceBaseCollection.add(_originalResourceBase); } } - jwac.setBaseResource(new ResourceCollection(resourceBaseCollection.toArray(new Resource[resourceBaseCollection.size()]))); } + + jwac.setAttribute(RESOURCE_BASES_POST_OVERLAY, jwac.getBaseResource()); } diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/Starter.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/Starter.java index 20ac0a64c31..c47ec2c4a2f 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/Starter.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/Starter.java @@ -192,21 +192,23 @@ public class Starter str = (String)props.getProperty("tmp.dir.persist"); if (str != null) webApp.setPersistTempDirectory(Boolean.valueOf(str)); - - // - the base directories + + //Get the calculated base dirs which includes the overlays str = (String)props.getProperty("base.dirs"); if (str != null && !"".equals(str.trim())) { ResourceCollection bases = new ResourceCollection(str.split(",")); - webApp.setWar(bases.getResources()[0].toString()); + webApp.setWar(null); webApp.setBaseResource(bases); } - - // - put virtual webapp base resource first on resource path or not - str = (String)props.getProperty("base.first"); + + //Get the original base dirs without the overlays + str = (String)props.get("base.dirs.orig"); if (str != null && !"".equals(str.trim())) - webApp.setBaseAppFirst(Boolean.valueOf(str)); - + { + ResourceCollection bases = new ResourceCollection(str.split(",")); + webApp.setAttribute ("org.eclipse.jetty.resources.originalBases", bases); + } //For overlays str = (String)props.getProperty("maven.war.includes"); diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/ResponseWriter.java b/jetty-server/src/main/java/org/eclipse/jetty/server/ResponseWriter.java index c4c52573c26..a9f4e1dcd1a 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/ResponseWriter.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/ResponseWriter.java @@ -26,13 +26,14 @@ import java.util.Locale; import javax.servlet.ServletResponse; +import org.eclipse.jetty.io.EofException; import org.eclipse.jetty.io.RuntimeIOException; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; /* ------------------------------------------------------------ */ -/** +/** Specialized PrintWriter for servlet Responses *

An instance of ResponseWriter is the {@link PrintWriter} subclass returned by {@link Response#getWriter()}. * It differs from the standard {@link PrintWriter} in that:

* */ -class ResponseWriter extends PrintWriter +public class ResponseWriter extends PrintWriter { private static final Logger LOG = Log.getLogger(ResponseWriter.class); private final static String __lineSeparator = System.getProperty("line.separator"); @@ -132,7 +133,7 @@ class ResponseWriter extends PrintWriter throw new RuntimeIOException(_ioException); if (_isClosed) - throw new IOException("Stream closed"); + throw new EofException("Stream closed"); } @Override diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/Server.java b/jetty-server/src/main/java/org/eclipse/jetty/server/Server.java index f726e7d38f9..278dde475d3 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/Server.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/Server.java @@ -500,8 +500,10 @@ public class Server extends HandlerWrapper implements Attributes if (LOG.isDebugEnabled()) LOG.debug("{} on {}{}",request.getDispatcherType(),connection,"\n"+request.getMethod()+" "+request.getHttpURI()+"\n"+request.getHttpFields()); - if ("*".equals(target)) + if (HttpMethod.OPTIONS.is(request.getMethod()) || "*".equals(target)) { + if (!HttpMethod.OPTIONS.is(request.getMethod())) + response.sendError(HttpStatus.BAD_REQUEST_400); handleOptions(request,response); if (!request.isHandled()) handle(target, request, request, response); @@ -518,12 +520,6 @@ public class Server extends HandlerWrapper implements Attributes */ protected void handleOptions(Request request,Response response) throws IOException { - if (!HttpMethod.OPTIONS.is(request.getMethod())) - response.sendError(HttpStatus.BAD_REQUEST_400); - request.setHandled(true); - response.setStatus(200); - response.setContentLength(0); - response.closeOutput(); } /* ------------------------------------------------------------ */ diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java index e8157e9356f..61a7a120a3e 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ResourceHandler.java @@ -446,7 +446,9 @@ public class ResourceHandler extends HandlerWrapper // handle directories if (resource.isDirectory()) { - if (!request.getPathInfo().endsWith(URIUtil.SLASH)) + String pathInfo = request.getPathInfo(); + boolean endsWithSlash=(pathInfo==null?request.getServletPath():pathInfo).endsWith(URIUtil.SLASH); + if (!endsWithSlash) { response.sendRedirect(response.encodeRedirectURL(URIUtil.addPaths(request.getRequestURI(),URIUtil.SLASH))); return; diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java b/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java index c708c42e76c..57f3016bf2b 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java @@ -135,6 +135,45 @@ public abstract class HttpServerTestBase extends HttpServerTestFixture } } + @Test + public void testOPTIONS() throws Exception + { + configureServer(new OptionsHandler()); + + try (Socket client = newSocket(_serverURI.getHost(), _serverURI.getPort())) + { + OutputStream os = client.getOutputStream(); + + os.write(("OPTIONS * HTTP/1.1\r\n" + + "Host: "+_serverURI.getHost()+"\r\n" + + "Connection: close\r\n" + + "\r\n").getBytes(StandardCharsets.ISO_8859_1)); + os.flush(); + + // Read the response. + String response = readResponse(client); + + Assert.assertThat(response, Matchers.containsString("HTTP/1.1 200 OK")); + Assert.assertThat(response, Matchers.containsString("Allow: GET")); + } + + try (Socket client = newSocket(_serverURI.getHost(), _serverURI.getPort())) + { + OutputStream os = client.getOutputStream(); + + os.write(("GET * HTTP/1.1\r\n" + + "Host: "+_serverURI.getHost()+"\r\n" + + "Connection: close\r\n" + + "\r\n").getBytes(StandardCharsets.ISO_8859_1)); + os.flush(); + + // Read the response. + String response = readResponse(client); + + Assert.assertThat(response, Matchers.containsString("HTTP/1.1 400 ")); + Assert.assertThat(response, Matchers.not(Matchers.containsString("Allow: "))); + } + } /* * Feed a full header method diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestFixture.java b/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestFixture.java index 82fff8f4a9c..c06034279c6 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestFixture.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestFixture.java @@ -150,6 +150,21 @@ public class HttpServerTestFixture } } + protected static class OptionsHandler extends AbstractHandler + { + @Override + public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException + { + baseRequest.setHandled(true); + if (request.getMethod().equals("OPTIONS")) + response.setStatus(200); + else + response.setStatus(500); + + response.setHeader("Allow", "GET"); + } + } + protected static class HelloWorldHandler extends AbstractHandler { @Override diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java index 28e3286aa30..24ebf488ec1 100644 --- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java +++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java @@ -589,6 +589,11 @@ public class ServletHandler extends ScopedHandler } catch(RuntimeIOException e) { + if (e.getCause() instanceof IOException) + { + LOG.debug(e); + throw (IOException)e.getCause(); + } throw e; } catch(Exception e) diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/DoSFilter.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/DoSFilter.java index 0b6c6ea45f7..44ee4af8131 100644 --- a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/DoSFilter.java +++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/DoSFilter.java @@ -719,6 +719,10 @@ public class DoSFilter implements Filter prefix -= 8; ++index; } + + if (index == result.length) + return result; + // Sets the _prefix_ most significant bits to 1 result[index] = (byte)~((1 << (8 - prefix)) - 1); return result; @@ -1045,6 +1049,18 @@ public class DoSFilter implements Filter _whitelist.addAll(result); LOG.debug("Whitelisted IP addresses: {}", result); } + + /** + * Set a list of IP addresses that will not be rate limited. + * + * @param values whitelist + */ + public void setWhitelist(List values) + { + clearWhitelist(); + _whitelist.addAll(values); + LOG.debug("Whitelisted IP addresses: {}", values); + } /** * Clears the list of whitelisted IP addresses diff --git a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/DoSFilterTest.java b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/DoSFilterTest.java index caa7a1ac168..824d623afaa 100644 --- a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/DoSFilterTest.java +++ b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/DoSFilterTest.java @@ -79,19 +79,20 @@ public class DoSFilterTest extends AbstractDoSFilterTest { DoSFilter filter = new DoSFilter(); List whitelist = new ArrayList(); - whitelist.add("192.168.0.1"); + whitelist.add("192.168.0.1/32"); whitelist.add("10.0.0.0/8"); whitelist.add("4d8:0:a:1234:ABc:1F:b18:17"); whitelist.add("4d8:0:a:1234:ABc:1F:0:0/96"); - Assert.assertTrue(filter.checkWhitelist(whitelist, "192.168.0.1")); - Assert.assertFalse(filter.checkWhitelist(whitelist, "192.168.0.2")); - Assert.assertFalse(filter.checkWhitelist(whitelist, "11.12.13.14")); - Assert.assertTrue(filter.checkWhitelist(whitelist, "10.11.12.13")); - Assert.assertTrue(filter.checkWhitelist(whitelist, "10.0.0.0")); - Assert.assertFalse(filter.checkWhitelist(whitelist, "0.0.0.0")); - Assert.assertTrue(filter.checkWhitelist(whitelist, "4d8:0:a:1234:ABc:1F:b18:17")); - Assert.assertTrue(filter.checkWhitelist(whitelist, "4d8:0:a:1234:ABc:1F:b18:0")); - Assert.assertFalse(filter.checkWhitelist(whitelist, "4d8:0:a:1234:ABc:1D:0:0")); + filter.setWhitelist(whitelist); + Assert.assertTrue(filter.checkWhitelist("192.168.0.1")); + Assert.assertFalse(filter.checkWhitelist("192.168.0.2")); + Assert.assertFalse(filter.checkWhitelist("11.12.13.14")); + Assert.assertTrue(filter.checkWhitelist("10.11.12.13")); + Assert.assertTrue(filter.checkWhitelist("10.0.0.0")); + Assert.assertFalse(filter.checkWhitelist("0.0.0.0")); + Assert.assertTrue(filter.checkWhitelist("4d8:0:a:1234:ABc:1F:b18:17")); + Assert.assertTrue(filter.checkWhitelist("4d8:0:a:1234:ABc:1F:b18:0")); + Assert.assertFalse(filter.checkWhitelist("4d8:0:a:1234:ABc:1D:0:0")); } private boolean hitRateTracker(DoSFilter doSFilter, int sleep) throws InterruptedException diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/resource/Resource.java b/jetty-util/src/main/java/org/eclipse/jetty/util/resource/Resource.java index 1e4823bd40b..a8eccba115a 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/resource/Resource.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/resource/Resource.java @@ -193,7 +193,7 @@ public abstract class Resource implements ResourceFactory, Closeable } } - return newResource(url); + return newResource(url, useCaches); } /* ------------------------------------------------------------ */ diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/resource/URLResource.java b/jetty-util/src/main/java/org/eclipse/jetty/util/resource/URLResource.java index 537baa58792..db7961711f2 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/resource/URLResource.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/resource/URLResource.java @@ -303,7 +303,7 @@ public class URLResource extends Resource path = URIUtil.canonicalPath(path); - return newResource(URIUtil.addPaths(_url.toExternalForm(),path)); + return newResource(URIUtil.addPaths(_url.toExternalForm(),path), _useCaches); } /* ------------------------------------------------------------ */ diff --git a/tests/test-integration/src/test/java/org/eclipse/jetty/test/support/TestableJettyServer.java b/tests/test-integration/src/test/java/org/eclipse/jetty/test/support/TestableJettyServer.java index 7b9567fc3aa..495f0cdea63 100644 --- a/tests/test-integration/src/test/java/org/eclipse/jetty/test/support/TestableJettyServer.java +++ b/tests/test-integration/src/test/java/org/eclipse/jetty/test/support/TestableJettyServer.java @@ -33,6 +33,7 @@ import java.util.Map; import java.util.Properties; import org.eclipse.jetty.http.HttpScheme; +import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.NetworkConnector; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.xml.XmlConfiguration; @@ -119,7 +120,7 @@ public class TestableJettyServer for (int i = 0; i < this._xmlConfigurations.size(); i++) { URL configURL = this._xmlConfigurations.get(i); - // System.err.println("configuring: "+configURL); + System.err.println("configuring: "+configURL); XmlConfiguration configuration = new XmlConfiguration(configURL); if (last != null) { @@ -177,7 +178,6 @@ public class TestableJettyServer // Find the active server port. this._serverPort = ((NetworkConnector)_server.getConnectors()[0]).getLocalPort(); - // System.err.println("Server Port="+_serverPort); Assert.assertTrue("Server Port is between 1 and 65535. Actually <" + _serverPort + ">",(1 <= this._serverPort) && (this._serverPort <= 65535)); } diff --git a/tests/test-integration/src/test/resources/BIOHttp.xml b/tests/test-integration/src/test/resources/BIOHttp.xml deleted file mode 100644 index 6702f2dd325..00000000000 --- a/tests/test-integration/src/test/resources/BIOHttp.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - 300000 - 2 - false - - - - - diff --git a/tests/test-integration/src/test/resources/BIOHttps.xml b/tests/test-integration/src/test/resources/BIOHttps.xml deleted file mode 100644 index d9f94b7d202..00000000000 --- a/tests/test-integration/src/test/resources/BIOHttps.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - 300000 - 2 - false - /keystore - OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4 - OBF:1u2u1wml1z7s1z7a1wnl1u2g - - - - - -