summaryrefslogtreecommitdiff
path: root/tests/data
Commit message (Collapse)AuthorAgeFilesLines
...
* test558: fix for multissl buildsDaniel Stenberg2018-01-181-0/+1
| | | | | | vtls.c:multissl_init() might do a curl_free() call so strip that out to make this work with more builds. We just want to verify that memorytracking works so skipping one line is no harm.
* mime: clone mime tree upon easy handle duplication.Patrick Monnerat2018-01-142-1/+110
| | | | | | | | | | | | | | | | | | | | | A mime tree attached to an easy handle using CURLOPT_MIMEPOST is strongly bound to the handle: there is a pointer to the easy handle in each item of the mime tree and following the parent pointer list of mime items ends in a dummy part stored within the handle. Because of this binding, a mime tree cannot be shared between different easy handles, thus it needs to be cloned upon easy handle duplication. There is no way for the caller to get the duplicated mime tree handle: it is then set to be automatically destroyed upon freeing the new easy handle. New test 654 checks proper mime structure duplication/release. Add a warning note in curl_mime_data_cb() documentation about sharing user data between duplicated handles. Closes #2235
* test395: HTTP with overflow Content-Length valueDaniel Stenberg2018-01-132-1/+56
|
* test394: verify abort of rubbish in Content-Length: valueDaniel Stenberg2018-01-132-1/+60
|
* test393: verify --max-filesize with excessive Content-LengthDaniel Stenberg2018-01-132-1/+62
|
* HTTP: bail out on negative Content-Length: valuesDaniel Stenberg2018-01-131-1/+8
| | | | | | | | | | ... and make the max filesize check trigger if the value is too big. Updates test 178. Reported-by: Brad Spencer Fixes #2212 Closes #2223
* brotli: data at the end of content can be lostMikalai Ananenka2017-12-272-1/+199
| | | | | | | | | | Decoding loop implementation did not concern the case when all received data is consumed by Brotli decoder and the size of decoded data internally hold by Brotli decoder is greater than CURL_MAX_WRITE_SIZE. For content with unencoded length greater than CURL_MAX_WRITE_SIZE this can result in the loss of data at the end of content. Closes #2194
* curl_easy_reset: release mime-related data.Patrick Monnerat2017-12-202-1/+69
| | | | | | | | | | | Move curl_mime_initpart() and curl_mime_cleanpart() calls to lower-level functions dealing with UserDefined structure contents. This avoids memory leakages on curl-generated part mime headers. New test 2073 checks this using the cli tool --next option: it triggers a valgrind error if bug is present. Bug: https://curl.haxx.se/mail/lib-2017-12/0060.html Reported-by: Martin Galvan
* content_encoding: rework zlib_inflatePatrick Monnerat2017-12-202-1/+203
| | | | | | | | | | | | - When zlib version is < 1.2.0.4, process gzip trailer before considering extra data as an error. - Inflate with Z_BLOCK instead of Z_SYNC_FLUSH to maximize correct data and minimize corrupt data output. - Do not try to restart deflate decompression in raw mode if output has started or if the leading data is not available anymore. - New test 232 checks inflating raw-deflated content. Closes #2068
* Revert "curl: don't set CURLOPT_INTERLEAVEDATA"Daniel Stenberg2017-12-119-0/+9
| | | | | | | | | This reverts commit 9ffad8eb1329bb35c8988115ac7ed85cf91ef955. It was actually added rather recently in 8e8afa82cbb629 due to a crash that would otherwise happen in the RTSP code. As I don't think we've fixed that behavior yet, we better keep this work-around until we have fixed it better.
* tests: mark data files as non-executable in gitMichael Kaufmann2017-12-105-0/+0
|
* multi_done: prune DNS cacheDaniel Stenberg2017-12-101-47/+53
| | | | | | | | | | | | | Prune the DNS cache immediately after the dns entry is unlocked in multi_done. Timed out entries will then get discarded in a more orderly fashion. Test506 is updated Reported-by: Oleg Pudeyev Fixes #2169 Closes #2170
* curl: don't set CURLOPT_INTERLEAVEDATADaniel Stenberg2017-12-089-9/+0
| | | | | | | | | That data is only ever used by the CURLOPT_INTERLEAVEFUNCTION callback and that option isn't set or used by the curl tool! Updates the 9 tests that verify --libcurl Closes #2167
* conncache: fix several lock issuesDaniel Stenberg2017-12-051-1/+9
| | | | | | | | | If the lock is released before the dealings with the bundle is over, it may have changed by another thread in the mean time. Fixes #2132 Fixes #2151 Closes #2139
* sasl_getmesssage: make sure we have a long enough string to passDaniel Stenberg2017-12-052-1/+48
| | | | | | | | | | For pop3/imap/smtp, added test 891 to somewhat verify the pop3 case. For this, I enhanced the pingpong test server to be able to send back responses with LF-only instead of always using CRLF. Closes #2150
* libssh2: return CURLE_UPLOAD_FAILED on failure to uploadNikos Mavrogiannopoulos2017-12-011-1/+1
| | | | | | | This brings its in sync with the error code returned by the libssh backend. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* libssh2: send the correct CURLE error code on scp file not foundNikos Mavrogiannopoulos2017-12-011-1/+1
| | | | | | | | | | That also updates tests to expect the right error code libssh2 back-end returns CURLE_SSH error if the remote file is not found. Expect instead CURLE_REMOTE_FILE_NOT_FOUND which is sent by the libssh backend. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* wildcardmatch: fix heap buffer overflow in setcharsetDaniel Stenberg2017-11-272-1/+53
| | | | | | | | | | | | | The code would previous read beyond the end of the pattern string if the match pattern ends with an open bracket when the default pattern matching function is used. Detected by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4161 CVE-2017-8817 Bug: https://curl.haxx.se/docs/adv_2017-ae72.html
* test: add test for bad UNC/SMB path in file: URLMatthew Kerwin2017-11-242-1/+39
|
* test: add tests to ensure basic file: URLsMatthew Kerwin2017-11-243-1/+85
|
* test1264: verify URL with space in host name being rejectedMichael Kaufmann2017-11-222-1/+37
|
* url: reject ASCII control characters and space in host namesDaniel Stenberg2017-11-222-36/+10
| | | | | | | | | | Host names like "127.0.0.1 moo" would otherwise be accepted by some getaddrinfo() implementations. Updated test 1034 and 1035 accordingly. Fixes #2073 Closes #2092
* resolve: allow IP address within [] bracketsDaniel Stenberg2017-11-172-1/+57
| | | | | | | | | | | ... so that IPv6 addresses can be passed like they can for connect-to and how they're used in URLs. Added test 1324 to verify Reported-by: Alex Malinovich Fixes #2087 Closes #2091
* URL: return error on malformed URLs with junk after IPv6 bracketMichael Kaufmann2017-11-142-1/+38
| | | | | | Follow-up to aadb7c7. Verified by new test 1263. Closes #2072
* test1554: verify connection cache sharingDaniel Stenberg2017-11-092-1/+78
|
* HTTP: implement Brotli content encodingPatrick Monnerat2017-11-059-7/+314
| | | | | | | | | | | | This uses the brotli external library (https://github.com/google/brotli). Brotli becomes a feature: additional curl_version_info() bit and structure fields are provided for it and CURLVERSION_NOW bumped. Tests 314 and 315 check Brotli content unencoding with correct and erroneous data. Some tests are updated to accomodate with the now configuration dependent parameters of the Accept-Encoding header.
* HTTP: support multiple Content-EncodingsPatrick Monnerat2017-11-052-1/+201
| | | | | | | | | | This is implemented as an output streaming stack of unencoders, the last calling the client write procedure. New test 230 checks this feature. Bug: https://github.com/curl/curl/pull/2002 Reported-By: Daniel Bankhead
* curl: speed up handling of many URLsDaniel Stenberg2017-11-042-1/+52
| | | | | | | | | | | | | | By properly keeping track of the last entry in the list of URLs/uploads to handle, curl now avoids many meaningless traverses of the list which speeds up many-URL handling *MASSIVELY* (several magnitudes on 100K URLs). Added test 1291, to verify that it doesn't take ages - but we don't have any detection of "too slow" command in the test suite. Reported-by: arainchik on github Fixes #1959 Closes #2052
* curl: pass through [] in URLs instead of calling globbing errorDaniel Stenberg2017-11-042-1/+49
| | | | | | | Assisted-by: Per Lundberg Fixes #2044 Closes #2046 Closes #2048
* cli tool: in -F option arg, comma is a delimiter for files onlyPatrick Monnerat2017-10-291-3/+11
| | | | | | | | Also upgrade test 1133 to cover this case and clarify man page about form data quoting. Bug: https://github.com/curl/curl/issues/2022 Reported-By: omau on github
* auth: Added test cases for RFC7616Florin2017-10-2813-1/+1094
| | | | | | | | Updated docs to include support for RFC7616 Signed-off-by: Florin <petriuc.florin@gmail.com> Closes #1934
* curl_fnmatch: return error on illegal wildcard patternDaniel Stenberg2017-10-262-1/+53
| | | | | | | | | | ... instead of doing an infinite loop! Added test 1162 to verify. Reported-by: Max Dymond Fixes #2015 Closes #2017
* ftp: reject illegal IP/port in PASV 227 responseDaniel Stenberg2017-10-201-6/+2
| | | | | | | | | | ... by using range checks. Among other things, this avoids an undefined behavior for a left shift that could happen on negative or very large values. Closes #1997 Detected by OSS-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3694
* test653: check reuse of easy handle after mime data changePatrick Monnerat2017-10-202-1/+94
| | | | See issue #1999
* test308: disable if MultiSSL feature enabledPatrick Monnerat2017-10-191-0/+1
| | | | | Even if OpenSSL is enabled, it might not be the default backend when multi-ssl is enabled, causing the test to fail.
* test652: curl_mime_data + base64 encoder with large contentsPatrick Monnerat2017-10-192-0/+359
|
* mime: limit bas64-encoded lines length to 76 charactersPatrick Monnerat2017-10-191-2/+2
|
* test651: curl_formadd with huge COPYCONTENTSDaniel Stenberg2017-10-132-1/+74
|
* mime: keep "text/plain" content type if user-specified.Patrick Monnerat2017-10-123-7/+10
| | | | | | Include test cases in 554, 587, 650. Fixes https://github.com/curl/curl/issues/1986
* cli tool: reimplement stdin buffering in -F option.Patrick Monnerat2017-10-121-6/+1
| | | | | | | | | | | | If stdin is not a regular file, its content is memory-buffered to enable a possible data "rewind". In all cases, stdin data size is determined before real use to avoid having an unknown part's size. --libcurl generated code is left as an unbuffered stdin fread/fseek callback part with unknown data size. Buffering is not supported in deprecated curl_formadd() API.
* test950; verify SMTP with custom requestDaniel Stenberg2017-10-102-1/+44
|
* FTP: URL decode path for dir listing in nocwd modeDaniel Stenberg2017-10-102-1/+55
| | | | | | | | Reported-by: Zenju on github Test 244 added to verify Fixes #1974 Closes #1976
* test298: verify --ftp-method nowcwd with URL encoded pathDaniel Stenberg2017-10-091-1/+1
| | | | Ref: #1974
* curl: don't pass semicolons when parsing Content-DispositionKristiyan Tsaklev2017-10-091-1/+1
| | | | | | Test 1422 updated to verify. Closes #1964
* RTSP: avoid integer overflow on funny RTSP responseDaniel Stenberg2017-10-092-1/+56
| | | | | | | | | ... like a very large non-existing RTSP version number. Added test 577 to verify. Detected by OSS-fuzz. Closes #1969
* Revert "multi_done: wait for name resolve to finish if still ongoing"Daniel Stenberg2017-10-081-0/+2
| | | | | | | | | This reverts commit f3e03f6c0ac52a1bf396e03f7d7e9b5b3b7165fe. Caused memory leaks in the fuzzer, needs to be done differently. Disable test 1553 for now too, as it causes memory leaks without this commit!
* pingpong: return error when trying to send without connectionDaniel Stenberg2017-10-072-1/+53
| | | | | | | | | | | | | When imap_done() got called before a connection is setup, it would try to "finish up" and dereffed a NULL pointer. Test case 1553 managed to reproduce. I had to actually use a host name to try to resolve to slow it down, as using the normal local server IP will make libcurl get a connection in the first curl_multi_perform() loop and then the bug doesn't trigger. Fixes #1953 Assisted-by: Max Dymond
* tests: added flaky keyword to tests 587 and 644Dan Fandrich2017-10-062-0/+2
| | | | These are around 5% flaky in my Linux x86 autobuilds.
* multi_cleanup: call DONE on handles that never got thatDaniel Stenberg2017-10-062-1/+53
| | | | | | | | | | | ... fixes a memory leak with at least IMAP when remove_handle is never called and the transfer is abruptly just abandoned early. Test 1552 added to verify Detected by OSS-fuzz Assisted-by: Max Dymond Closes #1954
* test1153: verify quoted double-qoutes in PWD responseDaniel Stenberg2017-10-022-1/+62
|