MCPcopy Create free account
hub / github.com/FongMi/CatVodSpider / proxy

Method proxy

app/src/main/java/com/github/catvod/spider/WebDAV.java:132–143  ·  view source on GitHub ↗
(Map<String, String> params)

Source from the content-addressed store, hash-verified

130 }
131
132 @Override
133 public Object[] proxy(Map<String, String> params) throws IOException {
134 String url = params.get("url");
135 String key = url.contains("/") ? url.substring(0, url.indexOf("/")) : url;
136 url = url.substring(key.length());
137 Drive drive = getDrive(key);
138 Object[] result = new Object[3];
139 result[0] = 200;
140 result[1] = "application/octet-stream";
141 result[2] = drive.getWebdav().get(drive.getHost() + url, getHeaders(params));
142 return result;
143 }
144
145 private List<DavResource> getList(Drive drive, String path, List<String> ext) throws IOException {
146 path = drive.getHost() + (path.startsWith(drive.getPath()) ? path : drive.getPath() + path);

Callers

nothing calls this directly

Calls 6

getDriveMethod · 0.95
getWebdavMethod · 0.95
getHostMethod · 0.95
getHeadersMethod · 0.95
substringMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected