Unuseful warnings with --xattr/--remote-time + --output /dev/null #6533
Labels
Comments
This is file output for all curl knows... |
bagder
added a commit
that referenced
this issue
Jan 26, 2021
For setting and getting time of the download. To make the outputs respect --silent etc. Reported-by: Viktor Szakats Fixes #6533
Indeed, that's the difficult part. This specific value can be hard-coded (which is rather unelegant), but I was wondering if there is a better (and possibly platform-agnostic) option. Many thanks for your quick PR, and if I read it correctly, this will also silence it like it is done with |
Yes, the PR will make the time-setting error message truly respect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using the pattern
curl <URL> --output /dev/null
(typically in conjunction with--write-out '%{<format>}'
to read the<format>
value without actually retrieving the URL content), while having--xattr
and/or--remote-time
options enabled (e.g. via.curlrc
or acurl
alias), the warnings below may (remote time only when the server returns aLast-Modified:
header) appear onstderr
, respectively:Example (for *nix platforms):
Actual console output:
Expected console output:
text/html; charset=UTF-8
An inconvenience rather than a bug per se, yet I think it'd be an improvement to try mitigating this, either by suppressing the warning when a non-file output is used, or by bringing
--remote-time
behavior closer to--xattr
and omit the warning if the--silent
option is used.The text was updated successfully, but these errors were encountered: