我尽可能地等待,但最终不得不从莫哈韦升级。
我知道有些东西会不必要地损坏。当然确实如此。
较大的文件(超过 100k)随机需要 5 秒才能加载。它并不总是相同的文件,也不是每次都相同,并且它只发生在 HTTP Apache 中(尝试过端口 80 和 8080)。它在 Apache HTTPS/443 和 HTTP/80 上的 Python SimpleHTTPServer 中运行良好。
我尝试过的事情:
brew reinstall httpd
。没有什么。重现步骤:
i=1; while [ $i -lt 50 ]; do time curl http://127.0.0.1/large.jpg > /dev/null; ((i++)); done
最终它会在 96% 时停滞 5 秒:
96 395k 96 382k
另一个文件:
i=1; while [ $i -lt 50 ]; do time curl http://127.0.0.1/jquery-latest.min.js > /dev/null; ((i++)); done
最终停在85%
85 95786 85 81390
httpd …
我正在尝试使用curl获取Google云端硬盘上的文件列表,但OAuth 2正在让我发挥最大作用.
以下是我尝试过的一些事情:
curl -H "Authorization: Bearer $token" https://www.googleapis.com/drive/v2/files
Run Code Online (Sandbox Code Playgroud)
$ token是我使用的460个字符的字符串:
https://www.google.com/accounts/ClientLogin
Run Code Online (Sandbox Code Playgroud)
和这个上传脚本(效果很好).这是我收到的错误:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "authError",
"message": "Invalid Credentials",
"locationType": "header",
"location": "Authorization"
}
],
"code": 401,
"message": "Invalid Credentials"
}
}
Run Code Online (Sandbox Code Playgroud)
还尝试过:
curl https://www.googleapis.com/drive/v2/files?key=apiKey
Run Code Online (Sandbox Code Playgroud)
错误:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "required",
"message": "Login Required",
"locationType": "header",
"location": "Authorization"
}
],
"code": 401,
"message": "Login Required"
}
}
Run Code Online (Sandbox Code Playgroud)
和:
curl -H "Authorization: GoogleLogin auth=${token}" "https://www.googleapis.com/drive/v2/files"
Run Code Online (Sandbox Code Playgroud)
错误:
{ …
Run Code Online (Sandbox Code Playgroud)