Revert "Fixing trailing characters treated as part of URI error (#3938)."
This reverts commit 8d45cc5827
.
This commit is contained in:
parent
3135550b83
commit
2957bccb33
|
@ -337,15 +337,9 @@ public class Patterns {
|
||||||
+ "\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,64}(?:\\:(?:[a-zA-Z0-9\\$\\-\\_"
|
+ "\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,64}(?:\\:(?:[a-zA-Z0-9\\$\\-\\_"
|
||||||
+ "\\.\\+\\!\\*\\'\\(\\)\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,25})?\\@";
|
+ "\\.\\+\\!\\*\\'\\(\\)\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,25})?\\@";
|
||||||
private static final String PORT_NUMBER = "\\:\\d{1,5}";
|
private static final String PORT_NUMBER = "\\:\\d{1,5}";
|
||||||
private static final String PATH_AND_QUERY_CHARS_WITHOUT_SLASH =
|
|
||||||
"\\;\\?\\:\\@\\&\\=\\#\\~" // plus optional query params
|
|
||||||
+ "\\-\\.\\+\\!\\*\\'\\(\\)\\,\\_\\$";
|
|
||||||
private static final String PATH_AND_QUERY = "\\/(?:(?:[" + LABEL_CHAR
|
private static final String PATH_AND_QUERY = "\\/(?:(?:[" + LABEL_CHAR
|
||||||
+ PATH_AND_QUERY_CHARS_WITHOUT_SLASH
|
+ "\\;\\/\\?\\:\\@\\&\\=\\#\\~" // plus optional query params
|
||||||
+ "]+[^" + PATH_AND_QUERY_CHARS_WITHOUT_SLASH + "\\s]" // path and query chars must not be trailing
|
+ "\\-\\.\\+\\!\\*\\'\\(\\)\\,\\_\\$])|(?:\\%[a-fA-F0-9]{2}))*";
|
||||||
+ "|\\/" // trailing slashes are fine
|
|
||||||
+ ")|(?:\\%[a-fA-F0-9]{2}))*";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Regular expression pattern to match most part of RFC 3987
|
* Regular expression pattern to match most part of RFC 3987
|
||||||
* Internationalized URLs, aka IRIs.
|
* Internationalized URLs, aka IRIs.
|
||||||
|
|
Loading…
Reference in a new issue