Answer the question
In order to leave comments, you need to log in
curl request error over https protocol?
I wrote a script for python 3.4.3 that uses the requests library. On a computer running Linux Mint, everything starts up fine, data is requested and received. Began to transfer to a virtual machine running Ubuntu Server 15.10. I ran the script and it hung. I started digging and got to the line where the post request to the server takes place using the https protocol.
import requests
pl = {'test':'test'}
r = requests.Session()
r.post("https://toster.ru",verify=False,data=pl)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 343, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 780, in _validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 241, in connect
ssl_version=resolved_ssl_version)
File "/usr/lib/python3/dist-packages/urllib3/util/ssl_.py", line 276, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.4/ssl.py", line 362, in wrap_socket
_context=self)
File "/usr/lib/python3.4/ssl.py", line 580, in __init__
self.do_handshake()
File "/usr/lib/python3.4/ssl.py", line 807, in do_handshake
self._sslobj.do_handshake()
KeyboardInterrupt
curl -v https://toster.ru
* Rebuilt URL to: https://toster.ru/
* Trying 178.248.236.52...
* Connected to toster.ru (178.248.236.52) port 443 (#0)
* found 187 certificates in /etc/ssl/certs/ca-certificates.crt
* found 748 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
Processed 187 CA certificate(s).
Resolving 'toster.ru'...
Connecting to '178.248.236.52:443'...
*** Fatal error: The operation timed out
*** Handshake has failed
GnuTLS error: The operation timed out
OpenSSL 1.0.2d 9 Jul 2015
gnutls-cli 3.3.15
curl 7.43.0 (x86_64-pc-linux-gnu) libcurl/7.43.0 GnuTLS/3.3.15 zlib/1.2.8 libidn/1.28 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question