cURL / Mailing Lists / curl-users / Single Mail

curl-users

http upload: how to stop on error (after continue)?

From: Craig Perras <cperras_at_u.washington.edu>
Date: Sat, 23 Aug 2008 20:57:08 -0700 (PDT)

I think the java servlets are broken wrt expect/continue. The app-server
immediately responds to expect headers with "100 continue" (anyone know
how to override this, or force the servlet to close the tcp connection?).

My large-file upload app does various checks and may return http errors
(401,404,416,etc), but curl continues uploading even if an error is sent.

I've wrapped curl, so I can manually check for an error condition (by
parsing the server's response headers) and kill the process, but why does
curl continue to upload if it sees a response like this?

< HTTP/1.1 100 Continue
< HTTP/1.1 409 Conflict
< ...

Is there some flag to tell curl to stop on such an error (I need http 1.1
for range support)? I'd like for users to be able to use the "stock" curl
client, but it should stop and alert the user in such cases.

thanks,
--craig
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2008-08-24