Commit Graph

73 Commits

Author SHA1 Message Date
Daniel Stenberg feb2dd2835 Replaced all uses of sprintf() with the safer snprintf(). It is just a
precaution to prevent mistakes to lead to buffer overflows.
2004-06-24 11:54:11 +00:00
Daniel Stenberg c39858aac0 Source cleanups. The major one being that we now _always_ use a Curl_addrinfo
linked list for name resolved data, even on hosts/systems with only IPv4
stacks as this simplifies a lot of code.
2004-06-24 07:43:48 +00:00
Daniel Stenberg 24572daccc Allow formposting of files larger than what fits in memory by not reading the
file until it is actually being uploaded.
Make sure we build and still work with HTTP disabled - the SSL code might use
the boundary string for some random seeding.
2004-06-14 08:51:43 +00:00
Daniel Stenberg 8f1783b8a7 provide curl_formfree() even when http is disabled, it does nothing then 2004-06-13 08:59:37 +00:00
Daniel Stenberg 2098871509 build again with disabled http 2004-06-10 07:46:24 +00:00
Daniel Stenberg 6ec145d4b4 when built with HTTP disabled, provide a curl_formadd() function anyway to
keep the API complete at all times
2004-06-09 08:22:02 +00:00
Daniel Stenberg af33c6b549 deleted trailing whitespace 2004-06-03 13:03:57 +00:00
Daniel Stenberg ccdcdb2a46 mark a value as alloced when strdup()ed to prevent memory leaks 2004-05-13 14:13:12 +00:00
Daniel Stenberg 005042e973 improved cleaning up in case of memory allocation failures 2004-05-12 09:02:23 +00:00
Daniel Stenberg 939866faab Left-over from before the return-code fix. This is probably the code that
causes xlc and gcc act differently on AIX.
2004-05-12 06:27:40 +00:00
Daniel Stenberg d3999e06d1 clear up memory on failure a little better 2004-05-11 14:48:53 +00:00
Daniel Stenberg 5c592f7dd9 Make this source code use our internal *printf().
Also some minor edits.
2004-05-11 11:29:02 +00:00
Daniel Stenberg e55dee3807 James Bursa added better error checking for failer memory calls when
building formposts
2004-05-10 07:11:52 +00:00
Daniel Stenberg d67ea8c7ad count the formdata size using a 64bit size if avaialble 2004-05-07 09:50:49 +00:00
Daniel Stenberg 9e31a0536e removed more leftovers from the formparse function 2004-05-04 09:31:04 +00:00
Daniel Stenberg 2960d37d71 removed curl_formparse() from the library 2004-05-04 08:24:13 +00:00
Daniel Stenberg 2a0a305300 only a minor comment/format change 2004-04-23 11:00:47 +00:00
Daniel Stenberg 70e2aadc18 Replaced Curl_FormReadOneLine with Curl_formpostheader as that is the only use
for it. It saves one extra copy of the header.

I also added comments for several functions in formdata.c
2004-04-23 10:37:52 +00:00
Daniel Stenberg 94a1d09ac7 more variable type fixing for the huge posts 2004-03-12 14:22:16 +00:00
Daniel Stenberg 88e226c686 some more size_t usage, and two added typecasts when converting from size_t
to long (MIPSpro warnings)
2004-03-03 13:11:28 +00:00
Daniel Stenberg 6c78b4b7c0 fixed some more size_t/int/long warnings and removed a few CMC comments 2004-02-27 13:21:14 +00:00
Daniel Stenberg d571064b65 Clear up int/long/size_t/ssize_t usage a bit 2004-02-26 13:40:43 +00:00
Daniel Stenberg 4d17d6876e Dan Fandrich's cleanup patch to make pedantic compiler options cause less
warnings. Minor edits by me.
2004-01-29 13:56:45 +00:00
Daniel Stenberg 053f6c85ef updated year in the copyright string 2004-01-07 09:19:33 +00:00
Daniel Stenberg 1e251a64f3 Default Content-Type for formparts has changed to "application/octet-stream".
This seems more appropriate, and I believe mozilla and the likes do this.

.html files now get text/html as Content-Type.

Pointed out in bug report #839806.
2003-11-13 07:43:18 +00:00
Daniel Stenberg 308bc9d919 use CURLDEBUG instead of MALLOCDEBUG for preprocessor conditions 2003-06-26 11:22:12 +00:00
Daniel Stenberg 1f2294d585 treat uploaded .html files as text/html by default 2003-04-15 09:29:39 +00:00
Daniel Stenberg 61788a0389 Changed how boundary strings are generated. This new way uses 28 dashes
and 12 following hexadecimal letters, which seems to be what IE uses.
This makes curl work smoother with more stupidly written server apps.

Worked this out together with Martijn Broenland.
2003-04-04 12:24:01 +00:00
Daniel Stenberg a7c72b7abf removed the local variables for emacs and vim, use the new sample.emacs
way for emacs, and vim users should provide a similar non-polluting style
2003-01-29 10:14:20 +00:00
Daniel Stenberg f26a338a54 copyright year update in the source header 2003-01-16 21:08:12 +00:00
Daniel Stenberg e90d528026 let the Curl_FormReader() return 0 when it reaches end of data to that the
chunked transfer work
2002-11-29 08:12:20 +00:00
Daniel Stenberg 01387f42c5 kromJx@crosswinds.net's fix that now uses checkprefix() instead of
strnequal() when the third argument was strlen(first argument) anyway.
This makes it less prone to errors. (Slightly edited by me)
2002-10-28 21:52:00 +00:00
Daniel Stenberg 6a88c8d845 prevent compiler warning 2002-10-28 19:21:30 +00:00
Daniel Stenberg ba4e69bebc updated source code boilerplate/header 2002-09-03 11:52:59 +00:00
Daniel Stenberg 131645dc31 Chris Combes added CURLFORM_BUFFER, CURLFORM_BUFFERPTR, CURLFORM_BUFFERLENGTH 2002-06-12 21:40:59 +00:00
Daniel Stenberg 08ef208fb7 added disable-[protocol] support, largely provided by Miklos Nemeth 2002-06-11 11:13:01 +00:00
Daniel Stenberg 5d2944c211 curl_formadd() now returns 'CURLFORMcode' instead of int, to better enable
checking for particular errors. curl/curl.h defines the errros
2002-05-21 07:44:27 +00:00
Daniel Stenberg 95f78080ab This makes formposting with a specified file missing fail. curl_easy_perform
will then return CURLE_READ_ERROR.
2002-04-15 11:19:03 +00:00
Daniel Stenberg 90b51831fd Tor Arntsen's fix for "CGI_Lite" compliance! 2002-04-03 11:11:01 +00:00
Daniel Stenberg 974f314f57 copyright string (year) update 2002-03-19 07:54:55 +00:00
Daniel Stenberg eaff1a344e made it pass stricter compiler flags with less warnings 2002-03-19 07:32:35 +00:00
Daniel Stenberg c819e234b8 now supports all options in arrays, except the CURLFORM_ARRAY itself 2002-03-13 12:10:20 +00:00
Daniel Stenberg 9f374c2050 Added support for CURLFORM_FILENAME to set the filename field of a file
part.
2002-03-11 15:18:59 +00:00
Daniel Stenberg b544c5fa5c ARGH the CRLF I removed recently was not only done after the initial
content-type header, it was used for each part and thus without this it
failed MISERABLY. *smacks forhead*
2002-02-06 15:48:53 +00:00
Daniel Stenberg a9c4963cc0 removed three loust fprintf()s
removed the initial CRLF in the formpost, as they are part of the request
and should be written by the code in http.c!
2002-01-29 20:30:56 +00:00
Daniel Stenberg e911945c55 #505514, as correctly pointed out by Antonio (anton@concord.ru), trying to
post a non-existing file should include nothing, not an error text!
2002-01-19 11:08:05 +00:00
Daniel Stenberg 2eb355733f Marcus Webster's newly added CURLFORM_CONTENTHEADER 2001-12-14 12:59:16 +00:00
Daniel Stenberg 0ffec712e1 Marcus Webster reported and fixed this read-one-byte-too-many problem... 2001-11-08 15:06:58 +00:00
Daniel Stenberg e165332211 minor fix to support multiple files in one formadd() call 2001-10-29 13:21:25 +00:00
Sterling Hughes 8e91d5de8e looks nicer and is better compatible with older vim versions 2001-10-11 09:32:19 +00:00