cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl to download a file, not the web page

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 19 Jun 2007 13:32:17 +0200 (CEST)

On Mon, 18 Jun 2007, Guirong Wang wrote:

> Difference between curl and LiveHTTPHeaders when first reach the download
> page:

> 1. In the LiveHTTPHeaders, there are two PD_STATEFUL's :
> PD_STATEFUL_bd4058f4-c931-11db-a47c-000255ef1e40=%2Flni%2Fpeb_prod;
> PD_STATEFUL_c918d4a6-fb7c-11d8-a381-000255ef1e40=%2FmyAccess;
> (as marked with -> at the beginning of the line), while there is only one PD_STAETFUL set up in the curl -v output:
> PD_STATEFUL_bd4058f4-c931-11db-a47c-000255ef1e40=%2Flni%2Fpeb_prod;
>
> 2.In the LiveHTTPHeaders, there is a following line ( as marked with <->)
> while there is no such line in the curl -v output. Accept-Encoding:
> gzip,deflate

1. Your browser clearly got a cookie more. As is seen in your LiveHTTPHeaders
log, you already had that cookie when you started your capture. You should
bettter clear all cookies first and then retry, as it is much likely that it
needs to do something initial to get that first cookie

2. The Accept-Encoding header is added with curl too if you use --compressed.

[...]

> Are these differences the possible causes for the incorrect download?

Yes

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-06-19