NSURLErrorDomain错误-3001
我尝试从 Internet 下载文件,但收到错误 -3001
。我一直在通过谷歌搜索,但该错误没有出现在任何网站上,所以我不知道这意味着什么。
谁能告诉我错误代码 "NSURLErrorDomain error -3001"
是什么意思?
谢谢
I'm trying to download a file from the internet, but I get the error -3001
back. I've been searching through google but the error doesn't appear on any website, so i have no idea what it means.
Can anyone tell me what the error code "NSURLErrorDomain error -3001"
means?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
还有所有
NSURL
错误代码的完整列表 此处。当您从 URL 加载系统收到神秘的错误消息时,它非常方便。There's also a full list of all
NSURL
error codes here. It's very handy when you get cryptic error messages from the URL loading system.我不久前写了一个苹果脚本,可以在头文件中搜索错误代码。您可以在此处找到 applescript。
我为您的错误代码运行了 applescript,并从 CFNetworkError.h 文件中获取了该代码。
I wrote an applescript awhile back that can search the header files for error codes. You can find the applescript here.
I ran that applescript for your error code and got this from the CFNetworkError.h file.
该错误来自以下事实:
setDestination
需要带有文件名的完整路径:这是错误的:
这是正确的:
所以解释是,可能您做了像我一样的事情:指定您所在的现有文件夹旨在放置数据。
PS:3001之前的破折号会阻止Google返回请求的任何结果:“NSURLErrorDomain错误-3001”,它被解析为:
“NSURLErrorDomain和错误而不是3001”
..The error comes from the fact that
setDestination
expects a full path with a filename:This is wrong:
This is right:
So the explanation is that probably you did something like I did: specify an existing folder where you intended to put the data.
PS: the dash before 3001 prevents Google from returning any results with the request: "NSURLErrorDomain error -3001", it is parsed as:
"NSURLErrorDomain and error and not 3001"
..