cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1231 7.26.0 Option --silent does not work with --head

From: Jari Aalto <jaalto_at_users.sf.net>
Date: Tue, 28 May 2013 09:02:26 +0000

Something to consider.

>From user's perspective, the current behavior is odd:

  --head
  => outputs data

  "Hm, I don't want that data, only the return code"
  --head --silent
  => still date

  ??

That's odd behavior when accustomed to all other programs where "silent" means "less output" or "real silence" (equiv. --quiet in many programs).

  

---
** [bugs:#1231] 7.26.0 Option --silent does not work with --head**
**Status:** pending-invalid
**Created:** Tue May 28, 2013 05:50 AM UTC by Jari Aalto
**Last Updated:** Tue May 28, 2013 08:58 AM UTC
**Owner:** Daniel Stenberg
In order to "run link checks" in scrips, it would be beneficial to use both of these options:
  curl --head --silent $URL || echo "FAIL: $URL"
Unfortunately the --silent option does not suppress the HEAD output in 7.26.0.
    $ curl --head --silent http://www.google.com/
    HTTP/1.1 302 Found
    Location: http://www.google.fi/
    Cache-Control: private
    Content-Type: text/html; charset=UTF-8
    ...
    Date: Tue, 28 May 2013 05:46:09 GMT
    Server: gws
    Content-Length: 218
    X-XSS-Protection: 1; mode=block
    X-Frame-Options: SAMEORIGIN
    $ echo $?
    0
---
Sent from sourceforge.net because you indicated interest in <https://sourceforge.net/p/curl/bugs/1231/>
To unsubscribe from further messages, please visit <https://sourceforge.net/auth/subscriptions/>
Received on 2013-05-28

These mail archives are generated by hypermail.

donate! Page updated May 06, 2013.
web site info

File upload with ASP.NET