cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-2915788 ] Silent command still produces output

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Fri, 18 Dec 2009 23:24:40 +0000

Bugs item #2915788, was opened at 2009-12-16 15:25
Message generated for change (Comment added) made by patriot666
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: Open
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: Patrick (patriot666)
Date: 2009-12-18 18: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 17: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

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET