MCPcopy Index your code
hub / github.com/XF-FS/APIKit / getUrlWithoutFilename

Method getUrlWithoutFilename

src/main/java/burp/utils/CommonUtils.java:73–86  ·  view source on GitHub ↗
(URL url)

Source from the content-addressed store, hash-verified

71 }
72
73 public static String getUrlWithoutFilename(URL url) {
74 String urlRootPath = CommonUtils.getUrlRootPath(url);
75 String path = url.getPath();
76 if (path.length() == 0) {
77 path = "/";
78 }
79 if (url.getFile().endsWith("/?format=openapi")) {
80 return urlRootPath + url.getFile();
81 }
82 if (path.endsWith("/")) {
83 return urlRootPath + path;
84 }
85 return urlRootPath + path.substring(0, path.lastIndexOf("/") + 1);
86 }
87
88 public static Set<String> getUrlPathListWithCrossDir(URL url) {
89 int i2;

Callers 3

doPassiveScanMethod · 0.95
urlAddPathMethod · 0.95
parseApiDocumentMethod · 0.95

Calls 1

getUrlRootPathMethod · 0.95

Tested by

no test coverage detected