curl / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl sometimes no response

From: Ray Satiro <raysatiro_at_yahoo.com>
Date: Tue, 23 Oct 2018 03:13:19 -0400

On 10/22/2018 10:27 PM, Zhengyu Pan wrote:
> I am using curl to get a webpage. But sometimes it doesn't have
> response. I don't know why happen this.     For example , i curl a
> webpase three times. But the first two times don't have response.
> my curl version is     
> [root_at_panzhengyu ~]# curl --version
> curl 7.61.1 (x86_64-redhat-linux-gnu) libcurl/7.61.1 OpenSSL/1.0.1e
> zlib/1.2.3 c-ares/1.14.0 libssh2/1.8.0 nghttp2/1.6.0
> Release-Date: 2018-09-05
> Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps
> pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp 
> Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM
> NTLM_WB SSL libz HTTP2 UnixSockets HTTPS-proxy Metalink

In the future please show us using text not screenshots. For reference
your command is:

curl -H "Cache-Control: no-cache" https://nn.cbcb.us/register.php

The first thing to do is turn on verbose mode -v and see what is
happening. In Windows 7 that transfer won't successfully output to the
console, fwrite will always write less characters than expected. I am
not sure why but I guess maybe there is some control character in the
contents. Though I doubt it's the issue since you are using Linux please
try outputting to a file and see if it makes a difference. Also I notice
you are using an old version of nghttp2 and that may have something to
do with it. I had success in Ubuntu every time I tried, about a dozen.

curl 7.61.1 (x86_64-pc-linux-gnu) libcurl/7.61.1 OpenSSL/1.0.2p
zlib/1.2.8 nghttp2/1.33.0 librtmp/2.3
Release-Date: 2018-09-05
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps
pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP HTTP2
UnixSockets HTTPS-proxy

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-10-23