cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl output appears different from what stored in file...

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 29 Jan 2015 18:23:47 +0100 (CET)

On Wed, 28 Jan 2015, Russ Jones wrote:

> curl -L -k -A "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36
> (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36" -interface
> 192.71.23.48 -o "/var/www/html/cache/test-192.71.23.48.txt"
> http://www.trusted-link.com/ip.php

We solved this on IRC. Turns out "-interface" was truly used exactly like that
and not with the proper two dashes: --interface.

By an interesting coincidence, "-interface" is a series of single-letter
options that work fine to put next to each other like that without any error.
It then makes the following "192.71.23.48" to be treated as a URL and curl can
proceed.

I'm considering if it would make sense to add a warning output to the option
parser in case -[string] happens to exacly match a --[string] option, since it
is then often this mistake being done.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2015-01-29