Bugs item #2915788, was opened at 2009-12-16 21:25
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2915788&group_id=976
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: client module
Group: wrong behaviour
>Status: Closed
Resolution: Invalid
Priority: 5
Private: No
Submitted By: Patrick (patriot666)
Assigned to: Daniel Stenberg (bagder)
Summary: Silent command still produces output
Initial Comment:
Using an extracted curl-7.19.7-ssl-sspi-zlib-static-bin-w32.zip on Windows XP SP2:
>curl --version
curl 7.19.7 (i386-pc-win32) libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: Largefile NTLM SSL SSPI libz
The silent command still produces output
curl --silent http://www.google.com
or
curl -s www.google.com
produces the HTML of the page.
----------------------------------------------------------------------
>Comment By: Daniel Stenberg (bagder)
Date: 2009-12-19 12:18
Message:
Right, not completely pointless but still not the job of -s.
If you don't want see the data curl transfers, you use -o or -O or you
redirect or pipe it somewhere. Like >/dev/null or > NUL on windows.
We don't have any option for shutting off the data output. I consider this
case closed. If you want to discuss further angles around adding such a
feature or similar, then I suggest posting to the curl-users mailing list
and see if others agree.
----------------------------------------------------------------------
Comment By: Patrick (patriot666)
Date: 2009-12-19 00:24
Message:
It's not actually pointless. Consider a situation where you are using cURL
to query a site for it's HTTP code (or any "get_info" equivalent). You
would only want 200, 404, 401, 403, etc. As it stands now, if you wanted
just that returned, without the actual HTTP of the page, you must use -o to
write the HTTP of the page to the file, and then -w to write the HTTP code
to the terminal. This could be used fairly frequently in batch scripting
to set a http_code variable, but would result in unnecessary file writes
from piping the HTTP code to a file over and over.
----------------------------------------------------------------------
Comment By: Daniel Stenberg (bagder)
Date: 2009-12-16 23:50
Message:
That's exactly how curl is designed to work. The silent option just means
that curl says nothing extra apart from doing its transfer output. Doing
"curl -s www.google.com" without putting the output somewhere is just...
pointless!
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2915788&group_id=976
Received on 2009-12-19