aboutsummaryrefslogtreecommitdiff
path: root/lib/formdata.c
AgeCommit message (Collapse)Author
2011-06-13curl_formget: fix FILE * leakDaniel Stenberg
Properly deal with the fact that the last fread() call most probably is a short read, and when using callbacks in fact all calls can be short reads. No longer consider a file read done until it returns a 0 from the read function. Reported by: Aaron Orenstein Bug: http://curl.haxx.se/mail/lib-2011-06/0048.html
2011-06-13curl_formget: treat CURLFORM_STREAM betterDaniel Stenberg
If a piece is set to use a callback to get the data, it should not be treated as data. It unfortunately also requires that curl_easy_perform() or similar has been used as otherwise the callback function hasn't been figured out and curl_formget won't know how to get the content.
2011-06-10unittest: mark all unit tested functionsDaniel Stenberg
With "@unittest: [num]" in the header comment for each tested function. Shows we have a log way to go still...
2011-04-27whitespace cleanup: no space first in conditionalsDaniel Stenberg
"if(a)" is our style, not "if( a )"
2011-04-27source cleanup: unify look, style and indent levelsDaniel Stenberg
By the use of a the new lib/checksrc.pl script that checks that our basic source style rules are followed.
2011-04-20CURL_DOES_CONVERSIONS: cleanupDaniel Stenberg
Massively reduce #ifdefs all over (23 #ifdef lines less so far) Moved conversion-specific code to non-ascii.c
2010-11-08fix compiler warningYang Tse
2010-10-20formdata: provide error messageDaniel Stenberg
When failing to build form post due to an error, the code now does a proper failf(). Previously libcurl would report an error like "failed creating formpost data" when a file wasn't possible to open which was not easy for users to figure out. I also lower cased a function name to be named more curl-style and removed some unnecessary code.
2010-03-24remove the CVSish $Id$ linesDaniel Stenberg
2010-01-22wrap long lines and do some indent policingDaniel Stenberg
2009-11-18Make usage of calloc()'s arguments consistent with rest of code baseYang Tse
2009-10-18Check for basename() is now done the same as other function checksYang Tse
2009-10-08Attempt to silence bogus compiler warning: "Potential null pointer dereference"Yang Tse
2009-09-17Moved Curl_rand() and Curl_srand() code from formdata.c and formdata.hYang Tse
into curl_rand.c and curl_rand.h
2009-06-15Replaced use of standard C library rand()/srand() by our own pseudo-random ↵Patrick Monnerat
number generator.
2009-06-09initialize fread callback pointer to avoid compiler warningYang Tse
2009-04-21libcurl's memory.h renamed to curl_memory.hYang Tse
2008-12-20malloc+memset => callocDaniel Stenberg
2008-11-18Avoid creating garbage on an OOM errorDan Fandrich
2008-11-14Added .xml as one of the few common file extensions known by the multipartDan Fandrich
form generator. Made the extensions part of the MIME type struct to reduce the size and run-time relocations necessary to build the table.
2008-11-14fix an OOM problem detected by Jim MeyeringDaniel Stenberg
2008-10-20added a NULL pointer check for the name field as it can in fact be NULL whenDaniel Stenberg
dereferenced here, if the app passes in a funny combo. Detected by coverity.com
2008-09-24ntoa() and inet_ntoa_r() no longer usedYang Tse
2008-09-06remove unnecessary typecasting of malloc()Yang Tse
2008-09-06remove unnecessary typecasting of calloc()Yang Tse
2008-09-02Made some variables const which eliminated some castsDan Fandrich
2008-08-16Library internal only C preprocessor macros FORMAT_OFF_T and FORMAT_OFF_TUYang Tse
remain in use as internal curl_off_t print formatting strings for the internal *printf functions which still cannot handle print formatting string directives such as "I64d", "I64u", and others available on MSVC, MinGW, Intel's ICC, and other DOS/Windows compilers. This reverts previous commit part which did: FORMAT_OFF_T -> CURL_FORMAT_CURL_OFF_T FORMAT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU
2008-08-15For congruency sake with the naming of other CURL_XXXXXX_CURL_OFF_T macros,Yang Tse
the names of the curl_off_t formatting string directives now become CURL_FORMAT_CURL_OFF_T and CURL_FORMAT_CURL_OFF_TU. CURL_FMT_OFF_T -> CURL_FORMAT_CURL_OFF_T CURL_FMT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU Remove the use of an internal name for the curl_off_t formatting string directives and use the common one available from the inside and outside of the library. FORMAT_OFF_T -> CURL_FORMAT_CURL_OFF_T FORMAT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU
2008-07-08Fixed test 554 to pass the torture test.Dan Fandrich
2008-03-31- Added CURLFORM_STREAM as a supported option to curl_formadd() to allow anDaniel Stenberg
application to provide data for a multipart with the read callback. Note that the size needs to be provided with CURLFORM_CONTENTSLENGTH when the stream option is used. This feature is verified by the new test case 554. This feature was sponsored by Xponaut.
2007-11-05removed space after if and while before the parenthesis for better source codeDaniel Stenberg
consistency
2007-09-27Enabled a few more gcc warnings with --enable-debug. Renamed a fewDan Fandrich
variables to avoid shadowing global declarations.
2007-08-27Fixed some minor type mismatches and missing consts mainly found by splint.Dan Fandrich
2007-08-05Patrick Monnerat updated the _FORM_DEBUG-enabled code, and I updated commentsDaniel Stenberg
based on his comments/suggestions.
2007-03-31Better deal with NULL pointers.Daniel Stenberg
CID 3 and 4 from the coverity.com scan.
2007-02-26Removed inclusion of <sys/types.h> and <sys/stat.h> in .c-filesGisle Vanem
since they're already included through "setup.h".
2007-01-27update copyright year noticeYang Tse
2007-01-14- David McCreedy provided libcurl changes for doing HTTP communication onDaniel Stenberg
non-ASCII platforms. It does add some complexity, most notably with more #ifdefs, but I want to see this supported added and I can't see how we can add it without the extra stuff added.
2006-08-29Avoid Metaware's High-C warning "'=' encountered where '==' may have been ↵Gisle Vanem
intended."
2006-07-27Yves Lejeune fixed so that replacing Content-Type: when doing multipartDaniel Stenberg
formposts work exactly the way you want it (and the way you'd assume it works)
2006-07-20David McCreedy fixed a build error when building libcurl with HTTP disabled,Daniel Stenberg
problem added with the curl_formget() patch.
2006-06-28fix minor compiler warningYang Tse
2006-06-24Michael Wallner added curl_formget(), which allows an application to extractDaniel Stenberg
(serialise) a previously built formpost (as with curl_formadd()).
2006-04-26Fixed signed/unsigned convertion errors in Salford-C.Gisle Vanem
#ifdef around WSAEDISCON in strerror.c.
2005-11-24Yang Tse: fix compilation errors when SSL is not disabled and HTTP isDaniel Stenberg
disabled
2005-05-02corrected copyright yearDaniel Stenberg
2005-04-26Cory Nelson's work on nuking compiler warnings when building on x64 withDaniel Stenberg
VS2005.
2004-12-22C ensures that static variables are initialized to 0Dan Fandrich
2004-12-16moved the lseek() and stat() magic defines to setup.h and now take advantageDaniel Stenberg
of struct_stat in formdata.c as well, to support formpost uploads of large files on Windows too
2004-12-15Add 'const' to immutable arrays.Dan Fandrich