diff --git a/jetty-util/pom.xml b/jetty-util/pom.xml
index eb887f256f4..b37c2ddd0cf 100644
--- a/jetty-util/pom.xml
+++ b/jetty-util/pom.xml
@@ -2,12 +2,13 @@
org.eclipse.jetty
jetty-project
- 8.1.11.v20130520-SNAPSHOT
+ 8.1.12-SNAPSHOT
4.0.0
jetty-util
Jetty :: Utilities
Utility classes for Jetty
+ http://www.eclipse.org/jetty
${project.groupId}.util
diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/B64Code.java b/jetty-util/src/main/java/org/eclipse/jetty/util/B64Code.java
index 78dd63c709b..b8da7597b54 100644
--- a/jetty-util/src/main/java/org/eclipse/jetty/util/B64Code.java
+++ b/jetty-util/src/main/java/org/eclipse/jetty/util/B64Code.java
@@ -350,12 +350,34 @@ public class B64Code
{
if (encoded==null)
return null;
+
+ ByteArrayOutputStream bout = new ByteArrayOutputStream(4*encoded.length()/3);
+ decode(encoded, bout);
+ return bout.toByteArray();
+ }
+
+ /* ------------------------------------------------------------ */
+ /**
+ * Base 64 decode as described in RFC 2045.
+ * Unlike {@link #decode(char[])}, extra whitespace is ignored.
+ * @param encoded String to decode.
+ * @param output stream for decoded bytes
+ * @return byte array containing the decoded form of the input.
+ * @throws IllegalArgumentException if the input is not a valid
+ * B64 encoding.
+ */
+ static public void decode (String encoded, ByteArrayOutputStream bout)
+ {
+ if (encoded==null)
+ return;
+
+ if (bout == null)
+ throw new IllegalArgumentException("No outputstream for decoded bytes");
int ci=0;
byte nibbles[] = new byte[4];
int s=0;
- ByteArrayOutputStream bout = new ByteArrayOutputStream(4*encoded.length()/3);
-
+
while (ci headers = new MultiMap();
while(true)
{
@@ -584,13 +587,21 @@ public class MultiPartInputStream
continue;
}
+ //Have a new Part
+ MultiPart part = new MultiPart(name, filename);
+ part.setHeaders(headers);
+ part.setContentType(contentType);
+ _parts.add(name, part);
+ part.open();
+
+ InputStream partInput = null;
if ("base64".equalsIgnoreCase(contentTransferEncoding))
{
- _in = new Base64InputStream(_in);
+ partInput = new Base64InputStream((ReadLineInputStream)_in);
}
else if ("quoted-printable".equalsIgnoreCase(contentTransferEncoding))
{
- _in = new FilterInputStream(_in)
+ partInput = new FilterInputStream(_in)
{
@Override
public int read() throws IOException
@@ -611,17 +622,9 @@ public class MultiPartInputStream
}
};
}
-
+ else
+ partInput = _in;
-
- //Have a new Part
- MultiPart part = new MultiPart(name, filename);
- part.setHeaders(headers);
- part.setContentType(contentType);
- _parts.add(name, part);
-
- part.open();
-
try
{
int state=-2;
@@ -633,33 +636,38 @@ public class MultiPartInputStream
while(true)
{
int b=0;
- while((c=(state!=-2)?state:_in.read())!=-1)
+ while((c=(state!=-2)?state:partInput.read())!=-1)
{
total ++;
if (_config.getMaxRequestSize() > 0 && total > _config.getMaxRequestSize())
throw new IllegalStateException("Request exceeds maxRequestSize ("+_config.getMaxRequestSize()+")");
state=-2;
+
// look for CR and/or LF
if(c==13||c==10)
{
if(c==13)
{
- _in.mark(1);
- int tmp=_in.read();
+ partInput.mark(1);
+ int tmp=partInput.read();
if (tmp!=10)
- _in.reset();
+ partInput.reset();
else
state=tmp;
}
break;
}
- // look for boundary
+
+ // Look for boundary
if(b>=0&&b0&&b0||c==-1)
{
+
if(b==byteBoundary.length)
lastPart=true;
if(state==10)
state=-2;
break;
}
+
// handle CR LF
if(cr)
part.write(13);
@@ -786,14 +798,15 @@ public class MultiPartInputStream
private static class Base64InputStream extends InputStream
{
- BufferedReader _in;
+ ReadLineInputStream _in;
String _line;
byte[] _buffer;
int _pos;
- public Base64InputStream (InputStream in)
+
+ public Base64InputStream(ReadLineInputStream rlis)
{
- _in = new BufferedReader(new InputStreamReader(in));
+ _in = rlis;
}
@Override
@@ -801,18 +814,29 @@ public class MultiPartInputStream
{
if (_buffer==null || _pos>= _buffer.length)
{
- _line = _in.readLine();
+ //Any CR and LF will be consumed by the readLine() call.
+ //We need to put them back into the bytes returned from this
+ //method because the parsing of the multipart content uses them
+ //as markers to determine when we've reached the end of a part.
+ _line = _in.readLine();
if (_line==null)
- return -1;
+ return -1; //nothing left
if (_line.startsWith("--"))
- _buffer=(_line+"\r\n").getBytes();
+ _buffer=(_line+"\r\n").getBytes(); //boundary marking end of part
else if (_line.length()==0)
- _buffer="\r\n".getBytes();
+ _buffer="\r\n".getBytes(); //blank line
else
- _buffer=B64Code.decode(_line);
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream((4*_line.length()/3)+2);
+ B64Code.decode(_line, baos);
+ baos.write(13);
+ baos.write(10);
+ _buffer = baos.toByteArray();
+ }
_pos=0;
}
+
return _buffer[_pos++];
}
}
diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/MultiPartInputStreamTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/MultiPartInputStreamTest.java
index 657714c9310..ecda413dcc4 100644
--- a/jetty-util/src/test/java/org/eclipse/jetty/util/MultiPartInputStreamTest.java
+++ b/jetty-util/src/test/java/org/eclipse/jetty/util/MultiPartInputStreamTest.java
@@ -710,6 +710,97 @@ public class MultiPartInputStreamTest extends TestCase
assertNotNull(p);
assertEquals(5, p.getSize());
}
+
+
+ public void testBase64EncodedContent () throws Exception
+ {
+ String contentWithEncodedPart =
+ "--AaB03x\r\n"+
+ "Content-disposition: form-data; name=\"other\"\r\n"+
+ "Content-Type: text/plain\r\n"+
+ "\r\n"+
+ "other" + "\r\n"+
+ "--AaB03x\r\n"+
+ "Content-disposition: form-data; name=\"stuff\"; filename=\"stuff.txt\"\r\n"+
+ "Content-Transfer-Encoding: base64\r\n"+
+ "Content-Type: application/octet-stream\r\n"+
+ "\r\n"+
+ B64Code.encode("hello jetty") + "\r\n"+
+ "--AaB03x\r\n"+
+ "Content-disposition: form-data; name=\"final\"\r\n"+
+ "Content-Type: text/plain\r\n"+
+ "\r\n"+
+ "the end" + "\r\n"+
+ "--AaB03x--\r\n";
+
+ MultipartConfigElement config = new MultipartConfigElement(_dirname, 1024, 3072, 50);
+ MultiPartInputStream mpis = new MultiPartInputStream(new ByteArrayInputStream(contentWithEncodedPart.getBytes()),
+ _contentType,
+ config,
+ _tmpDir);
+ mpis.setDeleteOnExit(true);
+ Collection parts = mpis.getParts();
+ assertEquals(3, parts.size());
+
+ Part p1 = mpis.getPart("other");
+ assertNotNull(p1);
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ IO.copy(p1.getInputStream(), baos);
+ assertEquals("other", baos.toString("US-ASCII"));
+
+ Part p2 = mpis.getPart("stuff");
+ assertNotNull(p2);
+ baos = new ByteArrayOutputStream();
+ IO.copy(p2.getInputStream(), baos);
+ assertEquals("hello jetty", baos.toString("US-ASCII"));
+
+ Part p3 = mpis.getPart("final");
+ assertNotNull(p3);
+ baos = new ByteArrayOutputStream();
+ IO.copy(p3.getInputStream(), baos);
+ assertEquals("the end", baos.toString("US-ASCII"));
+ }
+
+ public void testQuotedPrintableEncoding () throws Exception
+ {
+ String contentWithEncodedPart =
+ "--AaB03x\r\n"+
+ "Content-disposition: form-data; name=\"other\"\r\n"+
+ "Content-Type: text/plain\r\n"+
+ "\r\n"+
+ "other" + "\r\n"+
+ "--AaB03x\r\n"+
+ "Content-disposition: form-data; name=\"stuff\"; filename=\"stuff.txt\"\r\n"+
+ "Content-Transfer-Encoding: quoted-printable\r\n"+
+ "Content-Type: text/plain\r\n"+
+ "\r\n"+
+ "truth=3Dbeauty" + "\r\n"+
+ "--AaB03x--\r\n";
+ MultipartConfigElement config = new MultipartConfigElement(_dirname, 1024, 3072, 50);
+ MultiPartInputStream mpis = new MultiPartInputStream(new ByteArrayInputStream(contentWithEncodedPart.getBytes()),
+ _contentType,
+ config,
+ _tmpDir);
+ mpis.setDeleteOnExit(true);
+ Collection parts = mpis.getParts();
+ assertEquals(2, parts.size());
+
+ Part p1 = mpis.getPart("other");
+ assertNotNull(p1);
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ IO.copy(p1.getInputStream(), baos);
+ assertEquals("other", baos.toString("US-ASCII"));
+
+ Part p2 = mpis.getPart("stuff");
+ assertNotNull(p2);
+ baos = new ByteArrayOutputStream();
+ IO.copy(p2.getInputStream(), baos);
+ assertEquals("truth=beauty", baos.toString("US-ASCII"));
+ }
+
+
+
+
private String createMultipartRequestString(String filename)
{
diff --git a/jetty-webapp/pom.xml b/jetty-webapp/pom.xml
index 77eeb3bfad7..4c6db1ae602 100644
--- a/jetty-webapp/pom.xml
+++ b/jetty-webapp/pom.xml
@@ -2,12 +2,13 @@
org.eclipse.jetty
jetty-project
- 8.1.11.v20130520-SNAPSHOT
+ 8.1.12-SNAPSHOT
4.0.0
jetty-webapp
Jetty :: Webapp Application Support
Jetty web application support
+ http://www.eclipse.org/jetty
${project.groupId}.webapp
diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/StandardDescriptorProcessor.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/StandardDescriptorProcessor.java
index aeb272f121a..820bb13c4df 100644
--- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/StandardDescriptorProcessor.java
+++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/StandardDescriptorProcessor.java
@@ -1170,7 +1170,8 @@ public class StandardDescriptorProcessor extends IterativeDescriptorProcessor
String welcome = indexNode.toString(false, true);
//Servlet Spec 3.0 p. 74 welcome files are additive
- context.setWelcomeFiles((String[])LazyList.addToArray(context.getWelcomeFiles(),welcome,String.class));
+ if (welcome != null && welcome.trim().length() > 0)
+ context.setWelcomeFiles((String[])LazyList.addToArray(context.getWelcomeFiles(),welcome,String.class));
}
}
diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java
index a719755798f..00665d4c831 100644
--- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java
+++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java
@@ -991,16 +991,6 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
}
}
- /* ------------------------------------------------------------ */
- /** Add EventListener
- * Conveniance method that calls {@link #setEventListeners(EventListener[])}
- * @param listener
- */
- @Override
- public void addEventListener(EventListener listener)
- {
- setEventListeners(LazyList.addToArray(getEventListeners(), listener, EventListener.class));
- }
/* ------------------------------------------------------------ */
diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebXmlConfiguration.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebXmlConfiguration.java
index aad8c963cd7..8ff887eb8fa 100644
--- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebXmlConfiguration.java
+++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebXmlConfiguration.java
@@ -121,16 +121,8 @@ public class WebXmlConfiguration extends AbstractConfiguration
@Override
public void deconfigure (WebAppContext context) throws Exception
{
- // TODO preserve any configuration that pre-existed.
-
ServletHandler _servletHandler = context.getServletHandler();
- _servletHandler.setFilters(null);
- _servletHandler.setFilterMappings(null);
- _servletHandler.setServlets(null);
- _servletHandler.setServletMappings(null);
-
- context.setEventListeners(null);
context.setWelcomeFiles(null);
if (context.getErrorHandler() instanceof ErrorPageErrorHandler)
diff --git a/jetty-websocket/pom.xml b/jetty-websocket/pom.xml
index 8c7b2051fb2..59eb77ee784 100644
--- a/jetty-websocket/pom.xml
+++ b/jetty-websocket/pom.xml
@@ -3,13 +3,13 @@
jetty-project
org.eclipse.jetty
- 8.1.11.v20130520-SNAPSHOT
+ 8.1.12-SNAPSHOT
4.0.0
jetty-websocket
Jetty :: Websocket
-
+ http://www.eclipse.org/jetty
${project.groupId}.websocket
diff --git a/jetty-xml/pom.xml b/jetty-xml/pom.xml
index 66bfa21a5e2..b288218c69e 100644
--- a/jetty-xml/pom.xml
+++ b/jetty-xml/pom.xml
@@ -2,12 +2,13 @@
org.eclipse.jetty
jetty-project
- 8.1.11.v20130520-SNAPSHOT
+ 8.1.12-SNAPSHOT
4.0.0
jetty-xml
Jetty :: XML utilities
The jetty xml utilities.
+ http://www.eclipse.org/jetty
${project.groupId}.xml
diff --git a/pom.xml b/pom.xml
index 511bf34ff76..9907225765b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,9 +6,9 @@
20
jetty-project
- 8.1.11.v20130520-SNAPSHOT
+ 8.1.12-SNAPSHOT
Jetty :: Project
- ${jetty.url}
+ http://www.eclipse.org/jetty
pom
UTF-8
diff --git a/test-continuation-jetty6/pom.xml b/test-continuation-jetty6/pom.xml
index d853b66d602..86048b7d319 100644
--- a/test-continuation-jetty6/pom.xml
+++ b/test-continuation-jetty6/pom.xml
@@ -9,6 +9,7 @@
jar
Test :: Continuation - (Jetty 6)
Asynchronous API
+ http://www.eclipse.org/jetty
diff --git a/test-continuation/pom.xml b/test-continuation/pom.xml
index d2e2be18791..a33fc603dac 100644
--- a/test-continuation/pom.xml
+++ b/test-continuation/pom.xml
@@ -2,13 +2,14 @@
org.eclipse.jetty
jetty-project
- 8.1.11.v20130520-SNAPSHOT
+ 8.1.12-SNAPSHOT
4.0.0
test-continuation
jar
Test :: Continuation
Asynchronous API
+ http://www.eclipse.org/jetty
diff --git a/test-continuation/src/test/java/org/eclipse/jetty/continuation/ContinuationTest.java b/test-continuation/src/test/java/org/eclipse/jetty/continuation/ContinuationTest.java
index 99cc00fd0f0..321cfbd0850 100644
--- a/test-continuation/src/test/java/org/eclipse/jetty/continuation/ContinuationTest.java
+++ b/test-continuation/src/test/java/org/eclipse/jetty/continuation/ContinuationTest.java
@@ -21,16 +21,25 @@ package org.eclipse.jetty.continuation;
import java.io.IOException;
import java.io.InputStream;
import java.util.EnumSet;
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.Assert;
import org.eclipse.jetty.continuation.test.ContinuationBase;
import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.Request;
+import org.eclipse.jetty.server.RequestLog;
+import org.eclipse.jetty.server.Response;
import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.handler.RequestLogHandler;
import org.eclipse.jetty.server.nio.SelectChannelConnector;
import org.eclipse.jetty.servlet.FilterHolder;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHandler;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.util.IO;
+import org.eclipse.jetty.util.component.AbstractLifeCycle;
@@ -40,19 +49,27 @@ public class ContinuationTest extends ContinuationBase
protected ServletHandler _servletHandler;
protected SelectChannelConnector _connector;
FilterHolder _filter;
+ protected List _log = new ArrayList();
@Override
protected void setUp() throws Exception
{
_connector = new SelectChannelConnector();
_server.setConnectors(new Connector[]{ _connector });
+
+ _log.clear();
+ RequestLogHandler requestLogHandler = new RequestLogHandler();
+ requestLogHandler.setRequestLog(new Log());
+ _server.setHandler(requestLogHandler);
+
ServletContextHandler servletContext = new ServletContextHandler(ServletContextHandler.NO_SECURITY|ServletContextHandler.NO_SESSIONS);
- _server.setHandler(servletContext);
+ requestLogHandler.setHandler(servletContext);
+
_servletHandler=servletContext.getServletHandler();
ServletHolder holder=new ServletHolder(_servlet);
holder.setAsyncSupported(true);
_servletHandler.addServletWithMapping(holder,"/");
-
+
_server.start();
_port=_connector.getLocalPort();
@@ -61,6 +78,9 @@ public class ContinuationTest extends ContinuationBase
@Override
protected void tearDown() throws Exception
{
+ Assert.assertEquals(1,_log.size());
+ Assert.assertTrue(_log.get(0).startsWith("200 "));
+ Assert.assertTrue(_log.get(0).endsWith(" /"));
_server.stop();
}
@@ -155,4 +175,12 @@ public class ContinuationTest extends ContinuationBase
return IO.toString(in);
}
+ class Log extends AbstractLifeCycle implements RequestLog
+ {
+ public void log(Request request, Response response)
+ {
+ _log.add(response.getStatus()+" "+response.getContentCount()+" "+request.getRequestURI());
+ }
+
+ }
}
diff --git a/test-jetty-nested/pom.xml b/test-jetty-nested/pom.xml
index 148b6b2eac4..9a28f3f02f1 100644
--- a/test-jetty-nested/pom.xml
+++ b/test-jetty-nested/pom.xml
@@ -4,10 +4,11 @@
org.eclipse.jetty
jetty-project
- 8.1.11.v20130520-SNAPSHOT
+ 8.1.12-SNAPSHOT
test-jetty-nested
Jetty :: Nested Test
+ http://www.eclipse.org/jetty
war
diff --git a/test-jetty-servlet/pom.xml b/test-jetty-servlet/pom.xml
index 86bb7ed472b..5ef7c9e5488 100644
--- a/test-jetty-servlet/pom.xml
+++ b/test-jetty-servlet/pom.xml
@@ -2,12 +2,13 @@
org.eclipse.jetty
jetty-project
- 8.1.11.v20130520-SNAPSHOT
+ 8.1.12-SNAPSHOT
4.0.0
test-jetty-servlet
jar
Test :: Jetty Servlet Tester
+ http://www.eclipse.org/jetty
org.eclipse.jetty
diff --git a/test-jetty-servlet/src/main/java/org/eclipse/jetty/testing/HttpTester.java b/test-jetty-servlet/src/main/java/org/eclipse/jetty/testing/HttpTester.java
index 1621a7ec7aa..ad8e5d9287e 100644
--- a/test-jetty-servlet/src/main/java/org/eclipse/jetty/testing/HttpTester.java
+++ b/test-jetty-servlet/src/main/java/org/eclipse/jetty/testing/HttpTester.java
@@ -531,6 +531,15 @@ public class HttpTester
_genContent=null;
}
}
+
+ /* ------------------------------------------------------------ */
+ public void setContentBytes(byte[] bytes)
+ {
+ _parsedContent = null;
+ _genContent = bytes;
+ setLongHeader(HttpHeaders.CONTENT_LENGTH, bytes.length);
+
+ }
/* ------------------------------------------------------------ */
private class PH extends HttpParser.EventHandler
@@ -599,4 +608,12 @@ public class HttpTester
}
+ @Override
+ public String toString()
+ {
+ if (_method!=null)
+ return super.toString()+" "+_method+" "+_uri+" "+_version+"\n"+_fields.toString();
+
+ return super.toString()+" HTTP/1.1 "+_status+" "+_reason+"\n"+_fields.toString();
+ }
}
diff --git a/test-jetty-webapp/pom.xml b/test-jetty-webapp/pom.xml
index 1bacf0bf2bb..d5df9eb3af3 100644
--- a/test-jetty-webapp/pom.xml
+++ b/test-jetty-webapp/pom.xml
@@ -2,11 +2,12 @@
org.eclipse.jetty
jetty-project
- 8.1.11.v20130520-SNAPSHOT
+ 8.1.12-SNAPSHOT
4.0.0
test-jetty-webapp
Test :: Jetty Test Webapp
+ http://www.eclipse.org/jetty
war
diff --git a/tests/pom.xml b/tests/pom.xml
index 207862d3e15..2a7865ef466 100644
--- a/tests/pom.xml
+++ b/tests/pom.xml
@@ -21,11 +21,12 @@
org.eclipse.jetty
jetty-project
- 8.1.11.v20130520-SNAPSHOT
+ 8.1.12-SNAPSHOT
org.eclipse.jetty.tests
tests-parent
Jetty Tests :: Parent
+ http://www.eclipse.org/jetty
pom
diff --git a/tests/test-integration/pom.xml b/tests/test-integration/pom.xml
index df2ebc00d36..089de4f7c7c 100644
--- a/tests/test-integration/pom.xml
+++ b/tests/test-integration/pom.xml
@@ -20,12 +20,13 @@
org.eclipse.jetty.tests
tests-parent
- 8.1.11.v20130520-SNAPSHOT
+ 8.1.12-SNAPSHOT
4.0.0
test-integration
jar
Jetty Tests :: Integrations
+ http://www.eclipse.org/jetty
${project.build.directory}/test-wars
${project.build.directory}/test-libs
diff --git a/tests/test-integration/src/test/java/org/eclipse/jetty/test/jsp/JspAndDefaultWithAliasesTest.java b/tests/test-integration/src/test/java/org/eclipse/jetty/test/jsp/JspAndDefaultWithAliasesTest.java
index 82ffc331813..3ba4f2c5e1c 100644
--- a/tests/test-integration/src/test/java/org/eclipse/jetty/test/jsp/JspAndDefaultWithAliasesTest.java
+++ b/tests/test-integration/src/test/java/org/eclipse/jetty/test/jsp/JspAndDefaultWithAliasesTest.java
@@ -67,6 +67,7 @@ public class JspAndDefaultWithAliasesTest
// @formatter:off
data.add(new String[] { "false","/dump.jsp" });
+ data.add(new String[] { "false","/dump.jsp/" });
data.add(new String[] { "true", "/dump.jsp%00" });
data.add(new String[] { "false","/dump.jsp%00/" });
data.add(new String[] { "false","/dump.jsp%00x/dump.jsp" });
diff --git a/tests/test-integration/src/test/java/org/eclipse/jetty/test/jsp/JspAndDefaultWithoutAliasesTest.java b/tests/test-integration/src/test/java/org/eclipse/jetty/test/jsp/JspAndDefaultWithoutAliasesTest.java
index ab9f48473fc..5d119f86a02 100644
--- a/tests/test-integration/src/test/java/org/eclipse/jetty/test/jsp/JspAndDefaultWithoutAliasesTest.java
+++ b/tests/test-integration/src/test/java/org/eclipse/jetty/test/jsp/JspAndDefaultWithoutAliasesTest.java
@@ -68,6 +68,7 @@ public class JspAndDefaultWithoutAliasesTest
// @formatter:off
data.add(new Object[] { "/dump.jsp" });
+ data.add(new Object[] { "/dump.jsp/" });
data.add(new Object[] { "/dump.jsp%00" });
data.add(new Object[] { "/dump.jsp%00x" });
data.add(new Object[] { "/dump.jsp%00x/dump.jsp" });
diff --git a/tests/test-loginservice/pom.xml b/tests/test-loginservice/pom.xml
index 642929921b1..f3c7ac8c244 100644
--- a/tests/test-loginservice/pom.xml
+++ b/tests/test-loginservice/pom.xml
@@ -21,10 +21,11 @@
org.eclipse.jetty.tests
tests-parent
- 8.1.11.v20130520-SNAPSHOT
+ 8.1.12-SNAPSHOT
test-loginservice
Jetty Tests :: Login Service
+ http://www.eclipse.org/jetty
org.eclipse.jetty
diff --git a/tests/test-sessions/pom.xml b/tests/test-sessions/pom.xml
index 298b00f6f40..add39f5cf2c 100644
--- a/tests/test-sessions/pom.xml
+++ b/tests/test-sessions/pom.xml
@@ -21,10 +21,11 @@
org.eclipse.jetty.tests
tests-parent
- 8.1.11.v20130520-SNAPSHOT
+ 8.1.12-SNAPSHOT
test-sessions-parent
Jetty Tests :: Sessions :: Parent
+ http://www.eclipse.org/jetty
pom
diff --git a/tests/test-sessions/test-hash-sessions/pom.xml b/tests/test-sessions/test-hash-sessions/pom.xml
index 487b7b84cc7..ddfef203d01 100644
--- a/tests/test-sessions/test-hash-sessions/pom.xml
+++ b/tests/test-sessions/test-hash-sessions/pom.xml
@@ -21,10 +21,11 @@
org.eclipse.jetty.tests
test-sessions-parent
- 8.1.11.v20130520-SNAPSHOT
+ 8.1.12-SNAPSHOT
test-hash-sessions
Jetty Tests :: Sessions :: Hash
+ http://www.eclipse.org/jetty
diff --git a/tests/test-sessions/test-jdbc-sessions/pom.xml b/tests/test-sessions/test-jdbc-sessions/pom.xml
index 3c3df7e0b72..17cf4d85567 100644
--- a/tests/test-sessions/test-jdbc-sessions/pom.xml
+++ b/tests/test-sessions/test-jdbc-sessions/pom.xml
@@ -21,10 +21,11 @@
org.eclipse.jetty.tests
test-sessions-parent
- 8.1.11.v20130520-SNAPSHOT
+ 8.1.12-SNAPSHOT
test-jdbc-sessions
Jetty Tests :: Sessions :: JDBC
+ http://www.eclipse.org/jetty
diff --git a/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/ReloadedSessionMissingClassTest.java b/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/ReloadedSessionMissingClassTest.java
index 54094cd206f..3021e8d7c68 100644
--- a/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/ReloadedSessionMissingClassTest.java
+++ b/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/ReloadedSessionMissingClassTest.java
@@ -18,9 +18,7 @@
package org.eclipse.jetty.server.session;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
import java.io.File;
import java.io.FileWriter;
@@ -32,35 +30,32 @@ import javax.servlet.http.HttpServletResponse;
import org.eclipse.jetty.client.ContentExchange;
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.http.HttpMethods;
-import org.eclipse.jetty.util.IO;
+import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
+import org.eclipse.jetty.toolchain.test.TestingDir;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.StdErrLog;
+import org.eclipse.jetty.util.resource.Resource;
import org.eclipse.jetty.webapp.WebAppContext;
+import org.junit.Rule;
import org.junit.Test;
/**
* ReloadedSessionMissingClassTest
- *
- *
- *
*/
public class ReloadedSessionMissingClassTest
{
+ @Rule
+ public TestingDir testdir = new TestingDir();
@Test
public void testSessionReloadWithMissingClass() throws Exception
{
((StdErrLog)Log.getLogger(org.eclipse.jetty.server.session.JDBCSessionManager.class)).setHideStacks(true);
+ Resource.setDefaultUseCaches(false);
String contextPath = "/foo";
- File srcDir = new File(System.getProperty("basedir"), "src");
- File targetDir = new File(System.getProperty("basedir"), "target");
- File testDir = new File (srcDir, "test");
- File resourcesDir = new File (testDir, "resources");
- File unpackedWarDir = new File (targetDir, "foo");
- if (unpackedWarDir.exists())
- IO.delete(unpackedWarDir);
- unpackedWarDir.mkdir();
+ File unpackedWarDir = testdir.getDir();
+ testdir.ensureEmpty();
File webInfDir = new File (unpackedWarDir, "WEB-INF");
webInfDir.mkdir();
@@ -81,8 +76,8 @@ public class ReloadedSessionMissingClassTest
w.write(xml);
w.close();
- File foobarJar = new File (resourcesDir, "foobar.jar");
- File foobarNOfooJar = new File (resourcesDir, "foobarNOfoo.jar");
+ File foobarJar = MavenTestingUtils.getTestResourceFile("foobar.jar");
+ File foobarNOfooJar = MavenTestingUtils.getTestResourceFile("foobarNOfoo.jar");
URL[] foobarUrls = new URL[]{foobarJar.toURI().toURL()};
URL[] barUrls = new URL[]{foobarNOfooJar.toURI().toURL()};
diff --git a/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/WebAppObjectInSessionTest.java b/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/WebAppObjectInSessionTest.java
index bc6d47cac69..fe6675b2012 100644
--- a/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/WebAppObjectInSessionTest.java
+++ b/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/WebAppObjectInSessionTest.java
@@ -18,6 +18,7 @@
package org.eclipse.jetty.server.session;
+import org.eclipse.jetty.util.resource.Resource;
import org.junit.Test;
/**
@@ -30,6 +31,7 @@ public class WebAppObjectInSessionTest extends AbstractWebAppObjectInSessionTest
public AbstractTestServer createServer(int port)
{
+ Resource.setDefaultUseCaches(false);
return new JdbcTestServer(port);
}
diff --git a/tests/test-sessions/test-jdbc-sessions/src/test/resources/foobar.jar b/tests/test-sessions/test-jdbc-sessions/src/test/resources/foobar.jar
index 29b46ddee9f..ecf296c75c1 100644
Binary files a/tests/test-sessions/test-jdbc-sessions/src/test/resources/foobar.jar and b/tests/test-sessions/test-jdbc-sessions/src/test/resources/foobar.jar differ
diff --git a/tests/test-sessions/test-jdbc-sessions/src/test/resources/foobarNOfoo.jar b/tests/test-sessions/test-jdbc-sessions/src/test/resources/foobarNOfoo.jar
index fcb3ddf78c9..593b9b12bd0 100644
Binary files a/tests/test-sessions/test-jdbc-sessions/src/test/resources/foobarNOfoo.jar and b/tests/test-sessions/test-jdbc-sessions/src/test/resources/foobarNOfoo.jar differ
diff --git a/tests/test-sessions/test-mongodb-sessions/pom.xml b/tests/test-sessions/test-mongodb-sessions/pom.xml
index 473145e4ba6..a091ee1b71c 100644
--- a/tests/test-sessions/test-mongodb-sessions/pom.xml
+++ b/tests/test-sessions/test-mongodb-sessions/pom.xml
@@ -21,10 +21,11 @@
org.eclipse.jetty.tests
test-sessions-parent
- 8.1.11.v20130520-SNAPSHOT
+ 8.1.12-SNAPSHOT
test-mongodb-sessions
Jetty Tests :: Sessions :: Mongo
+ http://www.eclipse.org/jetty
diff --git a/tests/test-sessions/test-mongodb-sessions/src/test/resources/jetty-logging.properties b/tests/test-sessions/test-mongodb-sessions/src/test/resources/jetty-logging.properties
new file mode 100644
index 00000000000..fd2d21f9748
--- /dev/null
+++ b/tests/test-sessions/test-mongodb-sessions/src/test/resources/jetty-logging.properties
@@ -0,0 +1,4 @@
+# Setup default logging implementation for during testing
+org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog
+
+#org.eclipse.jetty.server.LEVEL=DEBUG
\ No newline at end of file
diff --git a/tests/test-sessions/test-sessions-common/pom.xml b/tests/test-sessions/test-sessions-common/pom.xml
index db8eefb8f44..ce4f2e93fe0 100644
--- a/tests/test-sessions/test-sessions-common/pom.xml
+++ b/tests/test-sessions/test-sessions-common/pom.xml
@@ -21,10 +21,11 @@
org.eclipse.jetty.tests
test-sessions-parent
- 8.1.11.v20130520-SNAPSHOT
+ 8.1.12-SNAPSHOT
test-sessions-common
Jetty Tests :: Sessions :: Common
+ http://www.eclipse.org/jetty
diff --git a/tests/test-webapps/pom.xml b/tests/test-webapps/pom.xml
index 6c85874a706..72fea5e9074 100644
--- a/tests/test-webapps/pom.xml
+++ b/tests/test-webapps/pom.xml
@@ -21,10 +21,11 @@
org.eclipse.jetty.tests
tests-parent
- 8.1.11.v20130520-SNAPSHOT
+ 8.1.12-SNAPSHOT
test-webapps-parent
Jetty Tests :: WebApps :: Parent
+ http://www.eclipse.org/jetty
pom
diff --git a/tests/test-webapps/test-webapp-rfc2616/pom.xml b/tests/test-webapps/test-webapp-rfc2616/pom.xml
index eab04df47ce..78ce58208f8 100644
--- a/tests/test-webapps/test-webapp-rfc2616/pom.xml
+++ b/tests/test-webapps/test-webapp-rfc2616/pom.xml
@@ -21,10 +21,11 @@
org.eclipse.jetty.tests
test-webapps-parent
- 8.1.11.v20130520-SNAPSHOT
+ 8.1.12-SNAPSHOT
test-webapp-rfc2616
Jetty Tests :: WebApp :: RFC2616
+ http://www.eclipse.org/jetty
war