mirror of
https://github.com/apple/pkl.git
synced 2026-04-24 01:08:34 +02:00
Fix parsing of URLs with plus signs (#1335)
This fixes an issue where URLs with schemes that contain `+`, `-`, and `.` would not be parsed correctly. For example, `foo+bar:///?baz.pkl` would turn into `foo+bar:///%3Fbaz.pkl`. The query param is lost, and turned into the path.
This commit is contained in:
@@ -48,7 +48,7 @@ import org.pkl.core.runtime.VmExceptionBuilder;
|
||||
public final class IoUtils {
|
||||
|
||||
// Don't match paths like `C:\`, which are drive letters on Windows.
|
||||
private static final Pattern uriLike = Pattern.compile("\\w+:[^\\\\].*");
|
||||
private static final Pattern uriLike = Pattern.compile("[\\w+.-]+:[^\\\\].*");
|
||||
|
||||
private static final Pattern windowsPathLike = Pattern.compile("\\w:\\\\.*");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user