curl-library
Re: curl_formadd and file uploads
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 15 Apr 2002 08:45:11 +0200 (MET DST)
Date: Mon, 15 Apr 2002 08:45:11 +0200 (MET DST)
On Sun, 14 Apr 2002, Craig Davison wrote:
> Actually I was thinking that curl needs error checking in (I believe)
> Curl_getFormData, which does the actual reading from the file. You'd
> probably have to percolate the error all the way back to curl_easy_perform
> and add some new CURLE_ error types for the various I/O things that could
> go wrong.
>
> That's assuming curl doesn't do this somewhere already...
No it doesn't do this already.
At lib/formdata.c:1179, it clearly just adds an empty field when it can't
read the given file. I think CURLE_READ_ERROR is a suitable error code for
this situation.
I'll have a go at this soon, I'll just put together a 7.9.6 release first...
Thanks for your input.
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2002-04-15