This commit is contained in:
地平线
2015-07-06 11:18:51 +08:00
parent 0f0ec56499
commit 98d2919b1f

View File

@@ -384,6 +384,11 @@ public final class HttpRequest extends Request {
return requestURI.substring(requestURI.lastIndexOf('/') + 1);
}
public String[] getRequstURIPaths(String prefix) {
if (requestURI == null || prefix == null) return new String[0];
return requestURI.substring(prefix.length() + (prefix.endsWith("/") ? 0 : 1)).split("//");
}
public String getRequestURI() {
return requestURI;
}