File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
jetty-core/jetty-util/src
main/java/org/eclipse/jetty/util
test/java/org/eclipse/jetty/util Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1944,7 +1944,7 @@ public static URI toURI(String reference)
1944
1944
}
1945
1945
{
1946
1946
// Anything else, scheme wise, is acceptable.
1947
- return uri ;
1947
+ return correctURI ( uri ) ;
1948
1948
}
1949
1949
}
1950
1950
if (LOG .isDebugEnabled ())
Original file line number Diff line number Diff line change @@ -1091,7 +1091,8 @@ public static Stream<Arguments> toURICases()
1091
1091
args .add (Arguments .of ("file:///D:/path/to/zed.jar" , "file:///D:/path/to/zed.jar" ));
1092
1092
args .add (Arguments .of ("file:/e:/zed/yotta.txt" , "file:///e:/zed/yotta.txt" ));
1093
1093
args .add (Arguments .of ("jar:file:///E:/path/to/bar.jar" , "jar:file:///E:/path/to/bar.jar" ));
1094
- args .add (Arguments .of ("jar:file:///E:/path/to/bar.jar" , "jar:file:///E:/path/to/bar.jar" ));
1094
+ // URI format (bad scheme case, but we preserve it)
1095
+ args .add (Arguments .of ("JAR:FILE:///E:/path/to/bar.jar" , "JAR:FILE:///E:/path/to/bar.jar" ));
1095
1096
}
1096
1097
else
1097
1098
{
@@ -1101,8 +1102,13 @@ public static Stream<Arguments> toURICases()
1101
1102
}
1102
1103
// URI format (absolute)
1103
1104
args .add (Arguments .of ("file:///path/to/zed.jar" , "file:///path/to/zed.jar" ));
1105
+ args .add (Arguments .of ("FILE:///path/to/zed.jar" , "file:///path/to/zed.jar" ));
1104
1106
args .add (Arguments .of ("jar:file:///path/to/bar.jar" , "jar:file:///path/to/bar.jar" ));
1105
-
1107
+ // URI format (bad scheme case, but we preserve it)
1108
+ args .add (Arguments .of ("JAR:FILE:///path/to/bar.jar" , "JAR:FILE:///path/to/bar.jar" ));
1109
+ // URI format (bad URL syntax)
1110
+ args .add (Arguments .of ("file:/path/to/bad.jar" , "file:///path/to/bad.jar" ));
1111
+ args .add (Arguments .of ("jar:file:/path/to/bad.jar!/" , "jar:file:///path/to/bad.jar!/" ));
1106
1112
return args .stream ();
1107
1113
}
1108
1114
You can’t perform that action at this time.
0 commit comments