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
The warning output gets mangled by the progress meter #4422
Comments
Hi! Thanks for your interest in curl and related manners, but you seem to have asked a question or help, and this is an issue tracker that we reserve for dealing with issues/bugs really. Please ask questions and ask for support etc on the dedicated mailing lists. You will also reach a lot more people that way! You clearly noticed that Now you want to keep some "talk" output and remove other and that's a different matter and we don't really let the user pick-and-choose among all of them. We have normal mode, silent mode and verbose mode. You need to pick one of them. Or work on adding some sort of new selection option that isn't currently available... |
Thanks for the quick response. As you probably noticed this is a bug report as well. Please check the second output from the non-silenced curl. The output with warings doesn't have new lines which makes it non-readable. Is this something that you consider as a bug? |
I guess it is a bug yes. The problem is of course that we have both the progress meter and the warnings getting shown and it's a bad mix since the progress meter will destroy anything else that is also shown... It will never be "pretty". |
Thanks, sounds like a good solution would be to hide the progress meter. |
When? |
Maybe when a flag is specified to hide it ? I mean, if it's hard to make it pretty by default I recon It would be desirable to let user to choose what to output. |
New option that allows a user to ONLY switch off curl's progress meter and leave everything else in "talkative" mode. Fixes #4422
Yes, that would be perfect. Thanks @bagder |
I can't reproduce the missing newline using master in Windows 7. Do you see that when you use master? |
@jay try curling a host that will refuse connections. I can reproduce it while trying to connect to http://localhost:1234
I havent tried master though. |
Interesting. I can't reproduce that here. It doesn't seem to affect Windows or maybe it's a timing issue. |
I just tried on windows and it actually doesn't do that while connection is refused. But by mistake I have copied exactly same command from macOS and because windows doesn't like single quotes it can't resolve localhost. Now it has no new lines in the output. Try executing exactly this:
This is latest curl v 7.66.0 The other interesting thing is when connection is refused the expotential backoff seems to not be triggered. Is this intentional? |
Ok I see. That doesn't work (look at your error message) because of the single quotes and you must have --retry-connrefused in your curlrc. Here's a minimal repro that shows me the issue in older curl versions but not in newer ones. curl 7.59:
master:
|
Ok, so it seems that new lines problem exists only when using non existent domain. Here an example:
|
Ok. I see Curl_pgrsDone (which adds the newline when the progress meter is done) is not called in some places. If the host cannot be resolved then it is not called. Curl_pgrsDone is called by multi_done which is the cleanup but multi_done is not called for early states in the state machine. If I add it to CURLM_STATE_WAITRESOLVE state it will solve at least something. I don't know if it is safe for all states though, @bagder. diff --git a/lib/multi.c b/lib/multi.c
index 6dfe884..4b8fd78 100755
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -1616,6 +1616,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
if(result) {
/* failure detected */
stream_error = TRUE;
+ multi_done(data, result, TRUE);
break;
}
}
|
|
I consider this bug very minor and won't work on it myself. It's been open 3+ months without activity. I think we should close it and I'm not sure it is even worth documenting in KNOWN_BUGS... |
I did this
Hi, I'm having problems hiding the progress bar but keeping the warings on the screen.
With such command I'm getting only the last error:
If I remove
--silent
I'm getting this:Or this ( no new lines before
Warning
) - depends on the error type:How can I hide the progress bar? After some googling it seems like the most wanted feature on the internet :)
Maybe the new flag can be introduced? Something like
--do-not-ever-show-me-the-progress-bar-as-i-know-what-im-doing
?I expected the following
curl/libcurl version
curl 7.54.0 (x86_64-apple-darwin18.0) libcurl/7.54.0 LibreSSL/2.6.5 zlib/1.2.11 nghttp2/1.24.1
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz HTTP2 UnixSockets HTTPS-proxy
operating system
Darwin GBML242731 18.7.0 Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64
The text was updated successfully, but these errors were encountered: