Merge pull request #6490 from eclipse/jetty-10.0.x-6489-UriCompliance
Issue #6489 - fix RFC3986_UNAMBIGUOUS and UNSAFE UriCompliance modes.
This commit is contained in:
commit
259f9af9c9
|
@ -13,8 +13,8 @@
|
||||||
|
|
||||||
package org.eclipse.jetty.http;
|
package org.eclipse.jetty.http;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
@ -150,10 +150,11 @@ public final class UriCompliance implements ComplianceViolation.Mode
|
||||||
public static final UriCompliance STRICT = new UriCompliance("STRICT", RFC3986.getAllowed());
|
public static final UriCompliance STRICT = new UriCompliance("STRICT", RFC3986.getAllowed());
|
||||||
|
|
||||||
private static final AtomicInteger __custom = new AtomicInteger();
|
private static final AtomicInteger __custom = new AtomicInteger();
|
||||||
|
private static final List<UriCompliance> KNOWN_MODES = List.of(DEFAULT, LEGACY, RFC3986, RFC3986_UNAMBIGUOUS, UNSAFE, SAFE, STRICT);
|
||||||
|
|
||||||
public static UriCompliance valueOf(String name)
|
public static UriCompliance valueOf(String name)
|
||||||
{
|
{
|
||||||
for (UriCompliance compliance : Arrays.asList(DEFAULT, LEGACY, RFC3986, STRICT, SAFE))
|
for (UriCompliance compliance : KNOWN_MODES)
|
||||||
{
|
{
|
||||||
if (compliance.getName().equals(name))
|
if (compliance.getName().equals(name))
|
||||||
return compliance;
|
return compliance;
|
||||||
|
|
Loading…
Reference in New Issue