cURL
Haxx ad
libcurl
Automatically get a mirror near you





COMPARE PRICES:
Digital cameras, MP3 Players, Camcorders, Mobile phones, PDA, Computers, Electronics LCD monitors, Printers, Notebook, DVD Players, Motherboards, TV, ipod, Processors. See all...

Shopping cart software
Online collaboration software

SourceForge.net Logo

cURL > Mailing List > Monthly Index > Single Mail

curl-users Archives

--include and --head - option order is important

From: Brock Noland <brockn_at_gmail.com>
Date: Sun, 13 Apr 2008 22:13:55 -0500

Greetings,

It appears as though when using -i and -I, you must specify -i after -I.

$ curl -I -i http://bashcurescancer.com
$ curl -i -I http://bashcurescancer.com
HTTP/1.1 200 OK
Date: Mon, 14 Apr 2008 03:11:35 GMT
Server: Apache/2.2.6 (Unix)
X-Pingback: http://bashcurescancer.com/wordpress/xmlrpc.php
Last-Modified: Mon, 14 Apr 2008 02:38:11 GMT
Connection: close
Content-Type: text/html; charset=UTF-8

I tested this with the latest version, curl-7.18.1 and confirmed this
situation still exists. I don't see anything in the manual about these
options having a required order (though I could have missed
something).

If this is indeed a bug, the fix, below, is trivial.

Thanks for you time,
Brock Noland

--- main.old.c 2008-04-13 16:10:49.000000000 -0500
+++ main.c 2008-04-13 16:13:32.000000000 -0500
@@ -2445,6 +2445,7 @@
         return err;
       break;
     case 'i':
+ if(CONF_HEADER != (config->conf&CONF_HEADER)
       config->conf ^= CONF_HEADER; /* include the HTTP header as well */
       break;
     case 'j':
Received on 2008-04-14

These mail archives are generated by hypermail.

donate! Page updated October 19, 2006.
web site info