Merge remote-tracking branch 'origin/jetty-9.3.x' into jetty-9.4.x
This commit is contained in:
commit
0f8bf0a64f
|
@ -815,6 +815,7 @@ public class AnnotationParser
|
|||
|
||||
MultiException me = new MultiException();
|
||||
// TODO do not force version 8 once ASM can scan 9
|
||||
// TODO support a different target for quickstart generation
|
||||
MultiReleaseJarFile jarFile = new MultiReleaseJarFile(jarResource.getFile(),8,false);
|
||||
jarFile.stream().forEach(e->
|
||||
{
|
||||
|
|
|
@ -106,6 +106,7 @@ public class RequestTest
|
|||
_server.setHandler(_handler);
|
||||
|
||||
ErrorHandler errors = new ErrorHandler();
|
||||
errors.setServer(_server);
|
||||
errors.setShowStacks(true);
|
||||
_server.addBean(errors);
|
||||
_server.start();
|
||||
|
@ -1400,6 +1401,42 @@ public class RequestTest
|
|||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBadCookies() throws Exception
|
||||
{
|
||||
final ArrayList<Cookie> cookies = new ArrayList<>();
|
||||
|
||||
_handler._checker = new RequestTester()
|
||||
{
|
||||
@Override
|
||||
public boolean check(HttpServletRequest request,HttpServletResponse response) throws IOException
|
||||
{
|
||||
javax.servlet.http.Cookie[] ca = request.getCookies();
|
||||
if (ca!=null)
|
||||
cookies.addAll(Arrays.asList(ca));
|
||||
response.getOutputStream().println("Hello World");
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
String response;
|
||||
|
||||
cookies.clear();
|
||||
response=_connector.getResponses(
|
||||
"GET / HTTP/1.1\n"+
|
||||
"Host: whatever\n"+
|
||||
"Cookie: path=value\n" +
|
||||
"Cookie: name=value\n" +
|
||||
"Connection: close\n"+
|
||||
"\n"
|
||||
);
|
||||
assertTrue(response.startsWith("HTTP/1.1 200 OK"));
|
||||
assertEquals(1,cookies.size());
|
||||
assertEquals("name", cookies.get(0).getName());
|
||||
assertEquals("value", cookies.get(0).getValue());
|
||||
|
||||
}
|
||||
|
||||
@Ignore("No longer relevant")
|
||||
@Test
|
||||
public void testCookieLeak() throws Exception
|
||||
|
|
|
@ -141,9 +141,10 @@ if proceedyn "Are you sure you want to release using above? (y/N)" n; then
|
|||
|
||||
# This is equivalent to 'mvn release:prepare'
|
||||
if proceedyn "Update project.versions for $VER_RELEASE? (Y/n)" y; then
|
||||
mvn org.codehaus.mojo:versions-maven-plugin:2.1:set \
|
||||
mvn org.codehaus.mojo:versions-maven-plugin:2.5:set \
|
||||
-DoldVersion="$VER_CURRENT" \
|
||||
-DnewVersion="$VER_RELEASE"
|
||||
-DnewVersion="$VER_RELEASE" \
|
||||
-DprocessAllModules=true
|
||||
fi
|
||||
if proceedyn "Commit $VER_RELEASE updates? (Y/n)" y; then
|
||||
git commit -a -m "Updating to version $VER_RELEASE"
|
||||
|
|
|
@ -27,5 +27,3 @@
|
|||
</servlet-mapping>
|
||||
|
||||
</web-app>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue