Navigation Menu

Skip to content
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

Excessive progress bar printing with unknown payload size #2158

Closed
staticfloat opened this issue Dec 6, 2017 · 2 comments
Closed

Excessive progress bar printing with unknown payload size #2158

staticfloat opened this issue Dec 6, 2017 · 2 comments

Comments

@staticfloat
Copy link

I did this

[20:08:38]$ curl -# -o /dev/null -L 'https://github.com/torvalds/linux/archive/v4.14-rc1.tar.gz' 2>&1 | tr '\r' '\n' | wc -l
88419
[20:08:56]$

I expected the following

I expected curl to output only 10 lines a second, but instead it output almost 4K lines a second. Note that this seems to happen only when the Content-Length header is not given, (which seems to be the case if you request a tarball from GitHub that hasn't been requested in a while, I suggest asking for rc1 tarballs of the Linux kernel, they don't seem to be downloaded very often, but once you download it, the Content-Length header will be provided for a short time afterward) which also seems to explain why the progress bar is locked at 100% all the time.

curl/libcurl version

$ curl -V
curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 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

operating system

ElementaryOS Loki (based on Ubuntu 16.04)

Other thoughts

My best guess is that this is because the progress "done" callback is getting called multiple times due to the Content-Length not being known.

bagder added a commit that referenced this issue Dec 7, 2017
Make it use a max 10Hz update frequency for this case as well. Return early if
the "point" hasn't moved since last invoke.

Fixes #2158
@bagder
Copy link
Member

bagder commented Dec 7, 2017

Ack. Pending fix now in #2163...

@bagder
Copy link
Member

bagder commented Dec 7, 2017

Thanks!

@bagder bagder closed this as completed in b5881d1 Dec 7, 2017
@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants