cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: boundary condition for --continue-at - and --fail

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 30 Jun 2003 10:28:40 +0200 (CEST)

On Fri, 27 Jun 2003, David Byron wrote:

> All of this makes sense to me. I probably just have to add some logic in my
> code to not call curl if the file is already 100% there. Unfortunately, I
> may not know if it's 100% there because I don't always know how big it's
> supposed to be.

curl returns an error if it doesn't download the full file.

> It seems like curl would know this somewhere along the way to returning an
> error. I'm an http beginner but is this info in an http header somewhere?
> Something like content-length? Maybe I need to send a separate message with
> --head to get this.

There's a content-length header in most cases yes, but not always. Data can be
sent using chunked-encoding as well.

> I added --trace trace.out to my command line to see what I could find. This
> is what I see in trace.out:

[snip]

> Is there something else I can do to see the server's 416 response?

Don't use --fail, and you'll see it with plain -v.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
Received on 2003-06-30