-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
获取https内容报错 #1
Comments
支持https 测试下百度或者其它网站https是否有问题。 |
查了一下问题,在ConnectionPool.php的create方法中增加ssl参数的设置就行了,如下: |
我又测试了下,没问题。 |
按照你的方法成功了,谢谢 |
是不是还不支持https,报错的内容如下:
SSL handshake error: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
Exception: Connection closed in /home/bdata/local/BData-service/vendor/workerman/http-client/src/Request.php:487
Stack trace:
#0 /home/bdata/local/BData-service/vendor/workerman/workerman/Connection/TcpConnection.php(949): Workerman\Http\Request->onUnexpectClose(Object(Workerman\Connection\AsyncTcpConnection))
#1 /home/bdata/local/BData-service/vendor/workerman/workerman/Connection/TcpConnection.php(776): Workerman\Connection\TcpConnection->destroy()
#2 /home/bdata/local/BData-service/vendor/workerman/workerman/Connection/TcpConnection.php(581): Workerman\Connection\TcpConnection->doSslHandshake(Resource id #31)
#3 /home/bdata/local/BData-service/vendor/workerman/workerman/Events/Select.php(294): Workerman\Connection\TcpConnection->baseRead(Resource id #31)
#4 /home/bdata/local/BData-service/vendor/workerman/workerman/Worker.php(2382): Workerman\Events\Select->loop()
#5 /home/bdata/local/BData-service/vendor/workerman/workerman/Worker.php(1490): Workerman\Worker->run()
#6 /home/bdata/local/BData-service/vendor/workerman/workerman/Worker.php(1320): Workerman\Worker::forkOneWorkerForLinux(Object(Workerman\Worker))
#7 /home/bdata/local/BData-service/vendor/workerman/workerman/Worker.php(1294): Workerman\Worker::forkWorkersForLinux()
#8 /home/bdata/local/BData-service/vendor/workerman/workerman/Worker.php(509): Workerman\Worker::forkWorkers()
#9 /home/bdata/local/BData-service/httpclient.php(40): Workerman\Worker::runAll()
#10 {main}SSL handshake error: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
The text was updated successfully, but these errors were encountered: