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

HTTP PUT, and the progress meter

From: Nick Jensen <nickrjensen_at_gmail.com>
Date: Tue, 8 Jun 2010 12:02:26 -0400

Hello All,

I am currently using libcurl to upload to Amazon's S3 using HTTP PUT
requests. Everything is working fine but with one little side effect
involving the progress meter.

If I make a PUT request to the S3 Rest API, and it is a "valid" request, the
upload will start, progress is reported throughout the upload, and when it
is done I get the HTTP response headers. Great!

But, if I make a PUT request that is "not valid", Amazon will return an XML
document saying what went wrong. This is fine, but before I receive that
failure response (body/headers), the progress_function is getting called and
with the 'ulnow' value > 0. This causes my UI to show that some amount of
bytes have been uploaded before it displays the error message that was
returned in the response.. In reality though, no bytes were uploaded. Or
maybe they were, and just got rejected? Not sure. Either way, my question is
how can detect what is "successful" upload progress with an HTTP PUT?

Thanks

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

These mail archives are generated by hypermail.

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

File upload with ASP.NET