content-type 有时为空

This commit is contained in:
lushunming 2025-07-10 13:56:12 +08:00
parent 90d4f7528b
commit 2a0682ea22
1 changed files with 51 additions and 51 deletions

View File

@ -135,12 +135,13 @@ public class ProxyVideo {
}
String range = StringUtils.isAllBlank(headers.get("range")) ? headers.get("Range") : headers.get("range");
SpiderDebug.log("---proxyMultiThread,Range:" + range);
//没有range,强行给他一个range让他去分片
if (StringUtils.isAllBlank(range)) {
range = "bytes=0-";
}
Map<String, String> rangeObj = parseRange(range);
//没有range,无需分割
if (rangeObj == null) {
SpiderDebug.log("没有range,无需分割");
return proxy(url, headers);
} else {
List<long[]> partList = generatePart(rangeObj, total);
// 存储执行结果的List
@ -203,7 +204,6 @@ public class ProxyVideo {
SpiderDebug.log("++proxy res respHeaders:" + Json.toJson(resHeader));
return new Object[]{206, contentType, in, resHeader};
}
} catch (Exception e) {
SpiderDebug.log("proxyMultiThread error:" + e.getMessage());