CURL返回(35)OpenSSL SSL_connect:SSL_ERROR_SYSCALL
我正在尝试系统地下载以下图像:
I'm trying to download, systematically, the following image:
https://floridakeyswebcams.tv/sloppycam/camarchive/0807.jpg
在Firefox中,图像显示正常.
In Firefox, the image displays fine.
使用CURL或wget时,下载失败.
When using CURL or wget, the download fails.
在具有Open SSL 1.1.0g的Ubuntu 18.04上,它会在curl中返回以下内容:
On Ubuntu 18.04 with Open SSL 1.1.0g, it returns the following in curl:
* Trying 74.209.245.140...
* TCP_NODELAY set
* Connected to floridakeyswebcams.tv (74.209.245.140) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to floridakeyswebcams.tv:443
* stopped the pause stream!
* Closing connection 0
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to floridakeyswebcams.tv:443
在老版本的三星Note 3上,它扎根,带有busybox和OpenSSL v1.0.0g,它将下载文件,但仅下载1 KB的空文件.
On a old Samsung Note 3, rooted, with busybox and OpenSSL v1.0.0g, it downloads the file but only a 1 KB empty file.
想法?
当它通过浏览器工作并且与curl不能以相同的方式工作时,您需要对curl请求进行一些更改.
When it works via the browser and doesn't work in the same way from curl, you need to make some changes to your curl request.
最新版本的Chrome浏览器支持复制为cURL"的一个很好的选择.这非常方便,可以解决大多数此类问题.
The latest versions of Chrome browser supports a very good option to "copy as cURL". This is very handy and will solve most such issues.
要访问此选项-
- 打开一个新标签页
- 右键单击以打开上下文菜单,选择检查"并打开网络"选项卡.
- 现在将URL粘贴到URL栏中并继续.它将导航到图像.
- 右键单击成功并显示图像的网络请求
- 在复制"菜单中,有复制为cURL"选项.
- 打开一个终端,然后粘贴到这里.这是curl命令,将起作用并模拟与Chrome浏览器完全相同的请求.
这在大多数情况下都有效,并且绝对适用于问题中给出的链接.
This will work in most cases and definitely works for the link given in the question.