cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: HTTP PUT, and the progress meter

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 9 Jun 2010 08:30:39 +0200 (CEST)

On Tue, 8 Jun 2010, Nick Jensen wrote:

> So if the 'ulnow' property is not a reliable source of upload progress

It is a reliable source of upload progress. It is NOT a reliable source for
info on upload success.

> is there some better way I can calculate it?

Not to my knowledge. You just need to accept that uploads can start but still
fail.

> Waiting for the response headers seems like the only way to determine a
> success or failure, but at that point the upload is either completely done
> or it failed, and the progress function gets called either way...

Yes. HTTP is asynchronous that way. One way that was designed into HTTP to
avoid this is the "Expect: 100-continue" request header, but unfortunately
servers mess this one up more often than not.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-06-09

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET