问题是:为什么long contentLength
在:
webView.setDownloadListener(new DownloadListener() {
@Override
public void onDownloadStart(String url, String userAgent,
String contentDisposition, String mimetype,
long contentLength)
等于' -1'当其他论点合适时?
如果网站上的Content-Length
如下:
header('HTTP/1.1 206 Partial Content');
header('Content-Range: bytes 0-' . ($offset + $length) . '/' . $size);
header("Content-Length: ".$size);
header("Content-Disposition: attachment; filename=".$fileName);
header("Content-Type: ".$contentType);
header("Accept-Ranges: bytes");
header("Pragma: public");
header("Cache-Control: no-cache");
header("Cache-Control: public, must-revalidate, post-check=0, pre-check=0");
所以这应该是成千上万的,它只在服务器端。 我怎么解决这个问题?