Merge branch `jetty-9.4.x` into `jetty-10.0.x`
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com> # Conflicts: # jetty-http/src/test/java/org/eclipse/jetty/http/CookieCutterTest.java # jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java
This commit is contained in:
commit
a6ab777150
|
@ -226,6 +226,20 @@ public class CookieCutterTest
|
|||
assertCookie("Cookies[1]", cookies[1], "server.detail", "cfg", 0, null);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testExcessiveSemicolons()
|
||||
{
|
||||
char[] excessive = new char[65535];
|
||||
Arrays.fill(excessive, ';');
|
||||
String rawCookie = "foo=bar; " + excessive + "; xyz=pdq";
|
||||
|
||||
Cookie[] cookies = parseCookieHeaders(CookieCompliance.RFC6265, rawCookie);
|
||||
|
||||
assertThat("Cookies.length", cookies.length, is(2));
|
||||
assertCookie("Cookies[0]", cookies[0], "foo", "bar", 0, null);
|
||||
assertCookie("Cookies[1]", cookies[1], "xyz", "pdq", 0, null);
|
||||
}
|
||||
|
||||
static class Cookie
|
||||
{
|
||||
String name;
|
||||
|
|
|
@ -26,6 +26,7 @@ import java.io.OutputStream;
|
|||
import java.net.URL;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
|
@ -842,8 +843,8 @@ public class StartArgs
|
|||
if (Utils.isBlank(localRepo))
|
||||
{
|
||||
// Try generic env variable
|
||||
String home = System.getenv("HOME");
|
||||
Path localMavenRepository = new File(new File(home, ".m2"), "repository").toPath();
|
||||
Path home = Paths.get(System.getProperty("user.home"));
|
||||
Path localMavenRepository = home.resolve(".m2/repository");
|
||||
if (Files.exists(localMavenRepository))
|
||||
localRepo = localMavenRepository.toString();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue