cURL / Mailing Lists / curl-users / Single Mail

curl-users

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

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 24 Aug 2008 09:24:38 +0200 (CEST)

On Sat, 23 Aug 2008, Craig Perras wrote:

> I think the java servlets are broken wrt expect/continue. The app-server
> immediately responds to expect headers with "100 continue"

There are a bazillion servers out there with similar problems. 100 continue is
just so very commonly implmented/served badly.

> 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

If that error truly is received before the (whole) body is sent, then I'd call
that a silly behavior and curl should only continue sending the data if
there's a small amount left (as it could then keep the connection open), but
otherwise I think it should stop sending.

Can you provide a test case that repeats this behavior? (with curl 7.18.2 or
later of course)

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
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