0
使用Casperjs我從遠程服務器下載一些APK,但得到一個空的apk(0字節)。casperjs響應頭content-length 0
try {
this.echo("Attempting to download file ");
var fs = require('fs');
var appUrl = 'http://website.com/download/someapp.apk';
casper.download(appUrl, fs.workingDirectory+'/'+'newApk.apk');
} catch (e) {
this.echo(e);
}
而我正在接受這個響應標題。
Server: nginx/1.10.2
Date: Mon, 15 May 2017 06:49:10 GMT
Content-Length: 0
Connection: keep-alive
X-Robots-Tag: noindex
Location:http://website.com/download/someapp.apk
Expires: Thu, 01 Jan 1970 00:00:01 GMT
Cache-Control: no-cache, max-age=0, no-cache, no-store, must-
revalidate, proxy-revalidate, no-transform
Pragma: no-cache