mirror of
https://github.com/zfile-dev/zfile.git
synced 2025-04-19 05:34:52 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4dd6cdb4b3 | ||
|
|
c6127c029f |
@@ -27,7 +27,7 @@ public class WebDavUrlAdapterImpl implements UrlAdapter {
|
||||
@Override
|
||||
public String getUrl(Request request) {
|
||||
// 匹配url前缀和驱动器ID
|
||||
Matcher matcher = RegexMatchUtils.match("^" + ZFileConstant.WEB_DAV_PREFIX + "/(\\d+?)(.*)",
|
||||
Matcher matcher = RegexMatchUtils.match("^" + ZFileConstant.WEB_DAV_PREFIX + "/(\\d+)(.*)",
|
||||
HttpManager.decodeUrl(request.getAbsolutePath()));
|
||||
final String driveId = RegexMatchUtils.getIndexResult(matcher, 1);
|
||||
if (driveId == null) {
|
||||
|
||||
@@ -153,7 +153,7 @@ public class WebDavController {
|
||||
*/
|
||||
private Integer getDriveId() {
|
||||
String requestUrl = HttpManager.decodeUrl(HttpManager.request().getAbsolutePath());
|
||||
final String driveId = RegexMatchUtils.matchByIndex("^" + ZFileConstant.WEB_DAV_PREFIX + "/(\\d+?)(.*)", requestUrl, 1);
|
||||
final String driveId = RegexMatchUtils.matchByIndex("^" + ZFileConstant.WEB_DAV_PREFIX + "/(\\d+)(.*)", requestUrl, 1);
|
||||
return driveId != null ? Integer.valueOf(driveId) : null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user