summaryrefslogtreecommitdiff
path: root/tests/data/test554
Commit message (Collapse)AuthorAgeFilesLines
* mime: keep "text/plain" content type if user-specified.Patrick Monnerat2017-10-121-2/+4
| | | | | | Include test cases in 554, 587, 650. Fixes https://github.com/curl/curl/issues/1986
* mime: tests and examples.Patrick Monnerat2017-09-021-2/+0
| | | | | | | | | | Additional mime-specific tests. Existing tests updated to reflect small differences (Expect: 100-continue, data size change due to empty lines, etc). Option -F headers= keyword added to tests. test1135 disabled until the entry point order change is resolved. New example smtp-mime. Examples postit2 and multi-post converted from form API to mime API.
* spelling fixesklemens2017-03-261-1/+1
| | | | Closes #1356
* formadd: support >2GB files on windowsDaniel Stenberg2015-11-021-0/+47
| | | | Closes #425
* testsuite: use binary output mode for custom curl test toolsMarc Hoersken2014-02-141-7/+7
| | | | | | | | | | | Do not try to convert line-endings to CRLF on Windows by setting stdout to binary mode, just like the curl tool does if --ascii is not specified. This should prevent corrupted stdout line-ending output like CRCRLF. In order to make the previously naive text-aware tests work with binary mode on Windows, text-mode is disabled for them if it is not actually part of the test case and line-endings are corrected.
* tests: add keywords for a couple of HTTP testsFabian Keil2013-08-111-0/+7
|
* formadd: wrong pointer for file name when CURLFORM_BUFFERPTR usedDaniel Stenberg2013-08-041-2/+2
| | | | | | | | | | | | | | | The internal function that's used to detect known file extensions for the default Content-Type got the the wrong pointer passed in when CURLFORM_BUFFER + CURLFORM_BUFFERPTR were used. This had the effect that strlen() would be used which could lead to an out-of-bounds read (and thus segfault). In most cases it would only lead to it not finding or using the correct default content-type. It also showed that test 554 and test 587 were testing for the previous/wrong behavior and now they're updated as well. Bug: http://curl.haxx.se/bug/view.cgi?id=1262 Reported-by: Konstantin Isakov
* formpost: better random boundariesDaniel Stenberg2013-06-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | When doing multi-part formposts, libcurl used a pseudo-random value that was seeded with time(). This turns out to be bad for users who formpost data that is provided with users who then can guess how the boundary string will look like and then they can forge a different formpost part and trick the receiver. My advice to such implementors is (still even after this change) to not rely on the boundary strings being cryptographically strong. Fix your code and logic to not depend on them that much! I moved the Curl_rand() function into the sslgen.c source file now to be able to take advantage of the SSL library's random function if it provides one. If not, try to use the RANDOM_FILE for seeding and as a last resort keep the old logic, just modified to also add microseconds which makes it harder to properly guess the exact seed. The formboundary() function in formdata.c is now using 64 bit entropy for the boundary and therefore the string of dashes was reduced by 4 letters and there are 16 hex digits following it. The total length is thus still the same. Bug: http://curl.haxx.se/bug/view.cgi?id=1251 Reported-by: "Floris"
* CURLFORM_BUFFER: insert filename as documentedDaniel Stenberg2011-08-081-1/+6
| | | | | | | | | | A regression where CURLFORM_BUFFER stopped to properly insert the file name part in the formpart. Bug introduced in commit f851f768578dc096. Added CURLFORM_BUFFER use to test 554 to verify this. Bug: http://curl.haxx.se/mail/lib-2011-07/0176.html Reported by: Henry Ludemann
* CURLFORM_STREAM: acknowledge CURLFORM_FILENAMEDaniel Stenberg2011-06-171-3/+8
| | | | | | | | | | | | | The CURLFORM_STREAM is documented to only insert a file name (and thus look like a file upload) in the part if CURLFORM_FILENAME is set, but in reality it always inserted a filename="" and if CURLFORM_FILENAME wasn't set, it would insert insert rubbish (or possibly crash). This is now fixed to work as documented, and test 554 has been extended to verify this. Reported by: Sascha Swiercy Bug: http://curl.haxx.se/mail/lib-2011-06/0070.html
* - Added CURLFORM_STREAM as a supported option to curl_formadd() to allow anDaniel Stenberg2008-03-311-0/+68
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.