aboutsummaryrefslogtreecommitdiff
path: root/lib/formdata.c
AgeCommit message (Collapse)Author
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
2004-11-02Paul Nolan fix to make libcurl build nicely on Windows CEDaniel Stenberg
2004-10-24Mohun Biswas found out that formposting a zero-byte file didn't work veryDaniel Stenberg
good. I fixed.
2004-10-08if basename was found, check for a prototype and if none was found, provideDaniel Stenberg
our own in the formdata.c file to prevent warnings on systems without it
2004-10-06removed tabs and trailing whitespace from sourceDaniel Stenberg
2004-10-05Only include libgen.h if we have a basename as well.Daniel Stenberg
Mainly meant to deal with the IRIX case which seems to requrie a "-lgen" lib to find the basename function and thus without the gen lib, it finds the header but not the function and our replacement function has a prototype that doesn't match the IRIX one. A different approach would be to make configure detect and use -lgen for the systems that require it.
2004-10-05let our basename() be staticDaniel Stenberg
2004-10-01someone should hit meDaniel Stenberg