cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Weird returned page from curl cmd

From: Fabian Keil <freebsd-listen_at_fabiankeil.de>
Date: Wed, 3 Apr 2013 10:48:13 +0200

bruce <badouglas_at_gmail.com> wrote:

> Trying to do a simple curl fetch of a page. I get the data, but when I
> compare the page to what I see in the FF/Opera browser, I get a difference.
>
> The key section on the browser is:
>
> 51% Men, 49% Women
>
> The same section from the curl is:
>
>
> 51.02081505702209%
[...]
>
> The actual test curl cmd I use is:
>
> curl -o "dee.txt"
> http://www.collegeview.com/schoolfacts/auburn-university-main-campus/figures
>
> It appears that the "%" causes some sort of expansion/rounding to occur in
> the data...
>
> Is there an attribute I should invoke that I missed. Didn't see anything
> when I scanned the man pages, or looked over google...

The expansion isn't done by curl, but by the server based on the request
headers.

If I add: -H "Accept-Language: en-EN"
to the command line I get the expected "51%".

Fabian

-------------------------------------------------------------------
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 2013-04-03