summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* test1591: fix spelling of http featureMarcel Raad2019-10-241-1/+1
| | | | | | The test never got run because the feature name is `http` in lowercase. Closes https://github.com/curl/curl/pull/4520
* conn-reuse: requests wanting NTLM can reuse non-NTLM connectionsDaniel Stenberg2019-10-232-1/+64
| | | | | | | | Added test case 338 to verify. Reported-by: Daniel Silverstone Fixes #4499 Closes #4514
* tests: add missing proxy featuresMarcel Raad2019-10-232-0/+2
|
* tests: use %FILE_PWD for file:// URLsMarcel Raad2019-10-2119-19/+19
| | | | | | | This way, we always have exactly one slash after the host name, making the tests pass when curl is compiled with the MSYS GCC. Closes https://github.com/curl/curl/pull/4512
* tests: add `connect to non-listen` keywordsMarcel Raad2019-10-212-0/+2
| | | | | | These tests try to connect to ports nothing is listening on. Closes https://github.com/curl/curl/pull/4511
* runtests: get textaware info from curl instead of perlMarcel Raad2019-10-201-1/+1
| | | | | | | | | | | The MSYS system on Windows can run the test suite for curl built with any toolset. When built with the MSYS GCC, curl uses Unix line endings, while it uses Windows line endings when built with the MinGW GCC, and `^O` reports 'msys' in both cases. Use the curl executable itself to determine the line endings instead, which reports 'x86_64-pc-msys' when built with the MSYS GCC. Closes https://github.com/curl/curl/pull/4506
* test1162: disable MSYS2's POSIX path conversionMarcel Raad2019-10-171-0/+4
| | | | | This avoids MSYS2 converting the backslasb in the URL to a slash, causing the test to fail.
* url: normalize CURLINFO_EFFECTIVE_URLDaniel Stenberg2019-10-164-2/+113
| | | | | | | | | | | | | | | | The URL extracted with CURLINFO_EFFECTIVE_URL was returned as given as input in most cases, which made it not get a scheme prefixed like before if the URL was given without one, and it didn't remove dotdot sequences etc. Added test case 1907 to verify that this now works as intended and as before 7.62.0. Regression introduced in 7.62.0 Reported-by: Christophe Dervieux Fixes #4491 Closes #4493
* tests: line ending fixes for WindowsMarcel Raad2019-10-1619-19/+19
| | | | | | Mark some files as text. Closes https://github.com/curl/curl/pull/4490
* tests: use proxy featureMarcel Raad2019-10-15133-5/+287
| | | | | | This makes the tests succeed when using --disable-proxy. Closes https://github.com/curl/curl/pull/4488
* smbserver: fix Python 3 compatibilityMarcel Raad2019-10-131-2/+5
| | | | | | Python 2's `ConfigParser` module is spelled `configparser` in Python 3. Closes https://github.com/curl/curl/pull/4484
* tests: use port 2 instead of 60000 for a safer non-listening portDaniel Stenberg2019-10-093-3/+3
| | | | ... when the tests want "connection refused".
* docs: document it as --no-progress-meter instead of the reverseDaniel Stenberg2019-10-091-1/+3
| | | | | | | | Follow-up to 93373a960c3bb4 Reported-by: infinnovation-dev on github Fixes #4474 Closes #4475
* curl: ensure HTTP 429 triggers --retryStian Soiland-Reyes2019-10-052-2/+2
| | | | | | | | This completes #3794. Also make sure the new tests from #4195 are enabled Closes #4465
* urlapi: fix use-after-free bugDaniel Stenberg2019-10-032-1/+80
| | | | | | | | | | | Follow-up from 2c20109a9b5d04 Added test 663 to verify. Reported by OSS-Fuzz Bug: https://crbug.com/oss-fuzz/17954 Closes #4453
* redirect: when following redirects to an absolute URL, URL encode itDaniel Stenberg2019-10-022-0/+76
| | | | | | | | ... to make it handle for example (RFC violating) embeded spaces. Reported-by: momala454 on github Fixes #4445 Closes #4447
* curl: create easy handles on-demand and not ahead of timeDaniel Stenberg2019-10-021-2/+2
| | | | | | | | | | This should again enable crazy-large download ranges of the style [1-10000000] that otherwise easily ran out of memory starting in 7.66.0 when this new handle allocating scheme was introduced. Reported-by: Peter Sumatra Fixes #4393 Closes #4438
* git: add tests/server/disabled to .gitignoreEmil Engler2019-09-301-0/+1
| | | | Closes #4441
* altsvc: accept quoted ma and persist valuesDaniel Stenberg2019-09-302-2/+12
| | | | | | As mandated by the spec. Test 1654 is extended to verify. Closes #4443
* cookies: using a share with cookies shouldn't enable the cookie engineDaniel Stenberg2019-09-284-59/+117
| | | | | | | | | | | | | | | | | The 'share object' only sets the storage area for cookies. The "cookie engine" still needs to be enabled or activated using the normal cookie options. This caused the curl command line tool to accidentally use cookies without having been told to, since curl switched to using shared cookies in 7.66.0. Test 1166 verifies Updated test 506 Fixes #4429 Closes #4434
* FTP: add test for FTPFILE_NOCWD: Avoid redundant CWDsZenju2019-09-274-2/+228
| | | | | | Add libtest 661 Closes #4417
* FTP: url-decode path before evaluationZenju2019-09-272-2/+4
| | | | Closes #4428
* tests: fix narrowing conversion warningsMarcel Raad2019-09-272-3/+3
| | | | | | | `timediff_t` is 64 bits wide also on 32-bit systems since commit b1616dad8f0. Closes https://github.com/curl/curl/pull/4415
* Revert "FTP: url-decode path before evaluation"Daniel Stenberg2019-09-262-4/+2
| | | | This reverts commit 2f036a72d543e96128bd75cb0fedd88815fd42e2.
* FTP: url-decode path before evaluationZenju2019-09-262-2/+4
| | | | Closes #4423
* urlapi: question mark within fragment is still fragmentDaniel Stenberg2019-09-241-0/+20
| | | | | | | | | | | The parser would check for a query part before fragment, which caused it to do wrong when the fragment contains a question mark. Extended test 1560 to verify. Reported-by: Alex Konev Fixes #4412 Closes #4413
* urlapi: CURLU_NO_AUTHORITY allows empty authority/host partJens Finkhaeuser2019-09-191-0/+23
| | | | | | | CURLU_NO_AUTHORITY is intended for use with unknown schemes (i.e. not "file:///") to override cURL's default demand that an authority exists. Closes #4349
* FTP: remove trailing slash from path for LIST/MLSDZenju2019-09-184-5/+5
| | | | Closes #4348
* unit1655: make it C90 compliantDaniel Stenberg2019-09-161-52/+55
| | | | | | Unclear why this was not detected in the CI. Follow-up to b7666027296a
* doh: fix (harmless) buffer overrunPaul Dreik2019-09-156-3/+148
| | | | | | | | Added unit test case 1655 to verify. Close #4352 the code correctly finds the flaws in the old code, if one temporarily restores doh.c to the old version.
* FTP: allow "rubbish" prepended to the SIZE responseDaniel Stenberg2019-09-133-1/+117
| | | | | | | | | | This is a protocol violation but apparently there are legacy proprietary servers doing this. Added test 336 and 337 to verify. Reported-by: Philippe Marguinaud Closes #4339
* FTP: skip CWD to entry dir when target is absoluteZenju2019-09-131-1/+0
| | | | Closes #4332
* urlapi: verify the IPv6 numerical addressDaniel Stenberg2019-09-101-0/+4
| | | | | | | | | It needs to parse correctly. Otherwise it could be tricked into letting through a-f using host names that libcurl would then resolve. Like '[ab.be]'. Reported-by: Thomas Vegas Closes #4315
* Curl_addr2string: take an addrlen argument tooDaniel Stenberg2019-08-312-2/+2
| | | | | | | | | | | This allows the function to figure out if a unix domain socket has a file name or not associated with it! When a socket is created with socketpair(), as done in the fuzzer testing, the path struct member is uninitialized and must not be accessed. Bug: https://crbug.com/oss-fuzz/16699 Closes #4283
* defines: avoid underscore-prefixed definesDaniel Stenberg2019-08-231-1/+3
| | | | | | | | | | | Double-underscored or underscore plus uppercase letter at least. ... as they're claimed to be reserved. Reported-by: patnyb on github Fixes #4254 Closes #4255
* http: fix use of credentials from URL when using HTTP proxyDaniel Stenberg2019-08-163-2/+104
| | | | | | | | | | | | | | | | When a username and password are provided in the URL, they were wrongly removed from the stored URL so that subsequent uses of the same URL wouldn't find the crendentials. This made doing HTTP auth with multiple connections (like Digest) mishave. Regression from 46e164069d1a5230 (7.62.0) Test case 335 added to verify. Reported-by: Mike Crowe Fixes #4228 Closes #4229
* tests: Replace outdated test case numbering documentationMike Crowe2019-08-151-21/+6
| | | | | | | | | Tests are no longer grouped by numeric range[1]. Let's stop saying that and provide some alternative advice for numbering tests. [1] https://curl.haxx.se/mail/lib-2019-08/0043.html Closes #4227
* vauth: Use CURLE_AUTH_ERROR for auth function errorsJay Satiro2019-08-141-1/+2
| | | | | | | | | | | | | | - Add new error code CURLE_AUTH_ERROR. Prior to this change auth function errors were signaled by CURLE_OUT_OF_MEMORY and CURLE_RECV_ERROR, and neither one was technically correct. Ref: https://github.com/curl/curl/pull/3848 Co-authored-by: Dominik Hölzl Closes https://github.com/curl/curl/pull/3864
* http3: make connection reuse workDaniel Stenberg2019-08-092-13/+5
| | | | Closes #4204
* cleanup: s/curl_debug/curl_dbg_debug in comments and docsDaniel Stenberg2019-08-081-3/+3
| | | | | | | | | | Leftovers from the function rename back in 76b63489495 Reported-by: Gisle Vanem Bug: https://github.com/curl/curl/commit/f3e0f071b14fcb46a453f69bdf4e062bcaacf362#com mitcomment-34601751 Closes #4203
* alt-svc: add protocol version selection maskingDaniel Stenberg2019-08-082-4/+4
| | | | | | | | | | | So that users can mask in/out specific HTTP versions when Alt-Svc is used. - Removed "h2c" and updated test case accordingly - Changed how the altsvc struct is laid out - Added ifdefs to make the unittest run even in a quiche-tree Closes #4201
* CURLINFO_RETRY_AFTER: parse the Retry-After header valueDaniel Stenberg2019-08-076-2/+230
| | | | | | | | This is only the libcurl part that provides the information. There's no user of the parsed value. This change includes three new tests for the parser. Ref: #3794
* tests: Fix the line endings for the SASL alt-auth testsJay Satiro2019-08-066-44/+44
| | | | | | | | | | | | | | | | | | | - Change data and protocol sections to CRLF line endings. Prior to this change the tests would fail or hang, which is because certain sections such as protocol require CRLF line endings. Follow-up to grandparent commit which added the tests. Ref: https://github.com/curl/curl/issues/3653 Ref: https://github.com/curl/curl/pull/3790 NOTE: This commit was cherry-picked and is part of a series of commits that added the authzid feature for upcoming 7.66.0. The series was temporarily reverted in db8ec1f so that it would not ship in a 7.65.x patch release. Closes https://github.com/curl/curl/pull/4186
* curl: --sasl-authzid added to support CURLOPT_SASL_AUTHZID from the toolSteve Holme2019-08-067-3/+332
| | | | | | | | | | | | Ref: https://github.com/curl/curl/issues/3653 Ref: https://github.com/curl/curl/pull/3790 NOTE: This commit was cherry-picked and is part of a series of commits that added the authzid feature for upcoming 7.66.0. The series was temporarily reverted in db8ec1f so that it would not ship in a 7.65.x patch release. Closes https://github.com/curl/curl/pull/4186
* curl_multi_poll: a sister to curl_multi_wait() that waits moreDaniel Stenberg2019-08-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Repeatedly we see problems where using curl_multi_wait() is difficult or just awkward because if it has no file descriptor to wait for internally, it returns immediately and leaves it to the caller to wait for a small amount of time in order to avoid occasional busy-looping. This is often missed or misunderstood, leading to underperforming applications. This change introduces curl_multi_poll() as a replacement drop-in function that accepts the exact same set of arguments. This function works identically to curl_multi_wait() - EXCEPT - for the case when there's nothing to wait for internally, as then this function will by itself wait for a "suitable" short time before it returns. This effectiely avoids all risks of busy-looping and should also make it less likely that apps "over-wait". This also changes the curl tool to use this funtion internally when doing parallel transfers and changes curl_easy_perform() to use it internally. Closes #4163
* http09: disable HTTP/0.9 by default in both tool and libraryDaniel Stenberg2019-08-067-6/+51
| | | | | | | | As the plan has been laid out in DEPRECATED. Update docs accordingly and verify in test 1174. Now requires the option to be set to allow HTTP/0.9 responses. Closes #4191
* alt-svc: more liberal ALPN name parsingDaniel Stenberg2019-08-031-1/+1
| | | | | | | | | Allow pretty much anything to be part of the ALPN identifier. In particular minus, which is used for "h3-20" (in-progress HTTP/3 versions) etc. Updated test 356. Closes #4182
* http_negotiate: improve handling of gss_init_sec_context() failuresKamil Dudka2019-08-013-1/+98
| | | | | | | | | | | | | If HTTPAUTH_GSSNEGOTIATE was used for a POST request and gss_init_sec_context() failed, the POST request was sent with empty body. This commit also restores the original behavior of `curl --fail --negotiate`, which was changed by commit 6c6035532383e300c712e4c1cd9fdd749ed5cf59. Add regression tests 2077 and 2078 to cover this. Fixes #3992 Closes #4171
* curl: cap the maximum allowed values for retry time argumentsDaniel Stenberg2019-07-302-1/+35
| | | | | | | | | | ... to avoid integer overflows later when multiplying with 1000 to convert seconds to milliseconds. Added test 1269 to verify. Reported-by: Jason Lee Closes #4166
* HTTP: use chunked Transfer-Encoding for HTTP_POST if size unknownBalazs Kovacsics2019-07-291-1/+16
| | | | | | | | | If using the read callback for HTTP_POST, and POSTFIELDSIZE is not set, automatically add a Transfer-Encoding: chunked header, same as it is already done for HTTP_PUT, HTTP_POST_FORM and HTTP_POST_MIME. Update test 1514 according to the new behaviour. Closes #4138