summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* mime: do not perform more than one read in a rowPatrick Monnerat2020-03-0215-77/+679
| | | | | | | | | | | | | | | | | | | | | Input buffer filling may delay the data sending if data reads are slow. To overcome this problem, file and callback data reads do not accumulate in buffer anymore. All other data (memory data and mime framing) are considered as fast and still concatenated in buffer. As this may highly impact performance in terms of data overhead, an early end of part data check is added to spare a read call. When encoding a part's data, an encoder may require more bytes than made available by a single read. In this case, the above rule does not apply and reads are performed until the encoder is able to deliver some data. Tests 643, 644, 645, 650 and 654 have been adapted to the output data changes, with test data size reduced to avoid the boredom of long lists of 1-byte chunks in verification data. New test 664 checks mimepost using single-byte read callback with encoder. New test 665 checks the end of part data early detection. Fixes #4826 Reported-by: MrdUkk on github
* mime: latch last read callback status.Patrick Monnerat2020-03-0213-12/+616
| | | | | | | | | | | | | | In case a read callback returns a status (pause, abort, eof, error) instead of a byte count, drain the bytes read so far but remember this status for further processing. Takes care of not losing data when pausing, and properly resume a paused mime structure when requested. New tests 670-673 check unpausing cases, with easy or multi interface and mime or form api. Fixes #4813 Reported-by: MrdUkk on github Closes #4833
* unit1651: Fixed conversion compilation warningSteve Holme2020-03-011-2/+2
| | | | | | | 371:17: warning: conversion to 'unsigned char' from 'int' may alter its value [-Wconversion] Closes #5008
* configure.ac: Disable metalink support if an incompatible SSL/TLS specifiedSteve Holme2020-03-011-0/+6
| | | | | | | | | | | | | | tool_metalink only supports cryptography from OpenSSL, GnuTLS, NSS, The Win32 Crypto library and Apple's Common Crypto library. If an TLS backend such as mbedTLS or WolfSSL is specified then the following error is given during compilation along, with a load of unresolved extern errors: Can't compile METALINK support without a crypto library. Reviewed-by: Daniel Stenberg Closes #5006
* ci/tests: Update Azure DevOps pipeline job display namesMarc Hoersken2020-03-011-23/+23
| | | | Make the configure step more descriptive and align others.
* ci/tests: Fix typo in previous commit 597cf2Marc Hoersken2020-03-011-1/+1
|
* ci/tests: Make sure that the AZURE_ACCESS_TOKEN is availableMarc Hoersken2020-03-011-1/+1
| | | | | For security reasons the access token is not available to PR builds. Therefore we should not try to use the DevOps API with an empty token.
* build: remove all HAVE_OPENSSL_ENGINE_H definesDaniel Stenberg2020-03-018-24/+8
| | | | | | | ... as there's nothing in the code that actually uses the define! The last reference was removed in 38203f158. Closes #5007
* CMake: clean up and improve build proceduresRolf Eike Beer2020-02-298-67/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - remove check for unsupported old CMake versions - do not link to c-ares library twice - modernize custom Find modules - FindLibSSH2: - pass version to FPHSA to show it in the output - use LIBSSH2_VERSION define to extract the version number in one shot. This variable exists in the header for 10 years. - remove unneeded code - FindNGHTTP2.cmake: - drop needless FPHSA argument - mark found variables as advanced - FindNSS.cmake: - show version number - FindCARES.cmake: - drop default paths - use FPHSA instead of checking things by hand - remove needless explict variable dereference - simplify count_true() - allow all policies up to version 3.16 to be set to NEW - do not rerun check for -Wstrict-aliasing=3 every time In contrast to every other compiler flag this has a = in it, which CMake can't have in a variable name. - only read the interesting strings from curlver.h Reviewed-by: Peter Wu Closes https://github.com/curl/curl/pull/4975
* runtests: fix output to command logJay Satiro2020-02-291-14/+3
| | | | | | | | | | | | - Record only the command of the most recently ran test in the command log. This is a follow-up to 02988b7 from several weeks ago which fixed writing to the command log, however it saved all commands for all tests instead of just the most recently ran test as we would now expect. Fixes https://github.com/curl/curl/commit/02988b7#commitcomment-37546876 Closes https://github.com/curl/curl/pull/5001
* polarssl: Additional removalSteve Holme2020-03-013-68/+2
| | | | | | | Follow up to 6357a19f. Reviewed-by: Daniel Stenberg Closes #5004
* docs: fix typo on CURLINFO_RETRY_AFTER - alwaus -> alwaysJonathan Cardoso Machado2020-02-291-1/+1
| | | | | Reviewed-by: Steve Holme Closes #5005
* md5: Added implementation for mbedTLSSteve Holme2020-02-291-0/+50
| | | | | Reviewed-by: Jay Satiro Closes #4980
* md5: Use pointer notation for array parameters in GnuTLS implementationSteve Holme2020-02-291-4/+4
|
* md4: Use non-deprecated functions in mbedTLS >= 2.7.0Steve Holme2020-02-291-1/+12
| | | | Closes #4983
* ci/tests: Send test results to Azure DevOps for reportingMarc Hoersken2020-02-293-1/+206
|
* pause: force-drain the transfer on unpauseDaniel Stenberg2020-02-292-2/+4
| | | | | | | | | ... since the socket might not actually be readable anymore when for example the data is already buffered in the TLS layer. Fixes #4966 Reported-by: Anders Berg Closes #5000
* TODO: curl --proxycommandDaniel Stenberg2020-02-291-0/+11
| | | | | Suggested-by: Kristian Mide Closes #4941
* smtp: overwriting 'from' leaks memoryDaniel Stenberg2020-02-281-0/+3
| | | | | | | | Detected by Coverity. CID 1418139. Also, make sure to return error if the new 'from' allocation fails. Closes #4997
* CIfuzz: switch off 'dry_run' modeDaniel Stenberg2020-02-281-3/+2
| | | | | | Follow-up from #4960: now make it fail if it detects problems. Closes #4998
* ci/tests: Increase timeouts of Windows builds due to new testsMarc Hoersken2020-02-281-10/+10
| | | | Recently added tests increased their runtime above the limit of 60min.
* ci/tests: align Azure Pipeline job names with each otherMarc Hoersken2020-02-271-5/+5
|
* ci/tests: Add Windows builds via Azure Pipelines using DockerMarc Hoersken2020-02-271-2/+220
|
* tests: fix Python 3 compatibility of smbserver.pyMarc Hoersken2020-02-271-2/+5
|
* runtests: restore the command logDaniel Stenberg2020-02-271-3/+3
| | | | | | | | The log file with all command lines for the invoked command lines is now called logs/commands.log Fixes #4911 Closes #4989
* smtp: fix memory leak on exit pathDaniel Stenberg2020-02-271-1/+3
| | | | | | | Detected by Coverity. CID 1418139. "leaked_storage: Variable 'from' going out of scope leaks the storage it points to" Closes #4990
* gtls: Fixed compilation when using GnuTLS < 3.5.0Steve Holme2020-02-271-1/+5
| | | | | | | | Reverts the functionality from 41fcb4f when compiling with GnuTLS older than 3.5.0. Reviewed-by: Daniel Stenberg Closes #4984
* RELEASE-NOTES: Corrected the link to issue #4892Steve Holme2020-02-271-1/+1
|
* Curl_is_ASCII_name: handle a NULL argumentDaniel Stenberg2020-02-272-2/+4
| | | | | | | | | | | | Make the function tolerate a NULL pointer input to avoid dereferencing that pointer. Follow-up to efce3ea5a85126d Detected by OSS-Fuzz Reviewed-By: Steve Holme Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20907 Fixes #4985 Closes #4986
* RELEASE-NOTES: syncedDaniel Stenberg2020-02-271-15/+38
|
* http2: make pausing/unpausing set/clear local stream windowDaniel Stenberg2020-02-275-39/+101
| | | | | | | | | | | | | This reduces the HTTP/2 window size to 32 MB since libcurl might have to buffer up to this amount of data in memory and yet we don't want it set lower to potentially impact tranfer performance on high speed networks. Requires nghttp2 commit b3f85e2daa629 (https://github.com/nghttp2/nghttp2/pull/1444) to work properly, to end up in the next release after 1.40.0. Fixes #4939 Closes #4940
* libssh: improve known hosts handlingAnderson Toshiyuki Sasaki2020-02-271-6/+92
| | | | | | | | | | | | | | | | Previously, it was not possible to get a known hosts file entry due to the lack of an API. ssh_session_get_known_hosts_entry(), introduced in libssh-0.9.0, allows libcurl to obtain such information and behave the same as when compiled with libssh2. This also tries to avoid the usage of deprecated functions when the replacements are available. The behaviour will not change if versions older than libssh-0.8.0 are used. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Fixes #4953 Closes #4962
* tests: Automatically deduce the tool name from the test case for unit testsSteve Holme2020-02-2739-153/+16
| | | | | | | | | | | | It is still possible to override the executable to run during the test, using the <tool> tag, but this patch removes the requirement that the tag must be present for unit tests. It also removes the possibility of human error when existing test cases are used as the basis for new tests, as recently witnessed in 81c37124. Reviewed-by: Daniel Stenberg Closes #4976
* test1323: Added the missing 'unit test' feature requirement in the test caseSteve Holme2020-02-271-0/+3
|
* cookie: remove unnecessary check for 'out != 0'Daniel Stenberg2020-02-261-1/+1
| | | | | | ... as it will always be non-NULL at this point. Detected by Coverity: CID 1459009
* http: added 417 response treatmentDaniel Stenberg2020-02-266-10/+137
| | | | | | | | | | | | | | | When doing a request with a body + Expect: 100-continue and the server responds with a 417, the same request will be retried immediately without the Expect: header. Added test 357 to verify. Also added a control instruction to tell the sws test server to not read the request body if Expect: is present, which the new test 357 uses. Reported-by: bramus on github Fixes #4949 Closes #4964
* smtp: Tidy up, following recent changes, to maintain the coding styleSteve Holme2020-02-261-4/+4
| | | | Closes #4892
* smtp: Support the SMTPUTF8 extension for the EXPN commandSteve Holme2020-02-263-10/+67
| | | | Simply notify the server we support the SMTPUTF8 extension if it does.
* smtp: Support the SMTPUTF8 extension in the VRFY commandSteve Holme2020-02-265-8/+131
|
* smtp: Support the SMTPUTF8 extension in the RCPT TO commandSteve Holme2020-02-264-6/+91
| | | | | | Note: The RCPT TO command isn't required to advertise to the server that it contains UTF-8 characters, instead the server is told that a mail may contain UTF-8 in any envelope command via the MAIL command.
* smtp: Support the SMTPUTF8 extension in the MAIL commandSteve Holme2020-02-264-19/+111
| | | | | | | | | | Support the SMTPUTF8 extension when sending mailbox information in the MAIL command (FROM and AUTH parameters). Non-ASCII domain names will be ACE encoded, if IDN is supported, whilst non-ASCII characters in the local address part are passed to the server. Reported-by: ygthien on github Fixes #4828
* smtp: Detect server support for the UTF-8 extension as defined in RFC-6531Steve Holme2020-02-262-0/+7
|
* smtp: Support UTF-8 based host names in the VRFY commandSteve Holme2020-02-265-8/+87
|
* smtp: Support UTF-8 based host names in the RCPT TO commandSteve Holme2020-02-264-5/+85
|
* smtp: Support UTF-8 based host names in the MAIL commandSteve Holme2020-02-264-7/+187
| | | | Non-ASCII host names will be ACE encoded if IDN is supported.
* url: Make the IDN conversion functions available to othersSteve Holme2020-02-262-19/+23
|
* smtp: Added UTF-8 mailbox tests to verify existing behaviourSteve Holme2020-02-258-1/+359
|
* ftpserver: Updated VRFY_smtp() so the response isn't necessary in the test caseSteve Holme2020-02-242-6/+15
|
* ftpserver: Corrected the e-mail address regex in MAIL_smtp() and RCTP_smtp()Steve Holme2020-02-241-3/+3
| | | | | | | | | | | | | | | | | | | | | The dot character between the host and the tld was not being escaped, which meant it specified a match of 'any' character rather than an explicit dot separator. Additionally removed the dot character from the host name as it allowed the following to be specified as a valid address in our test cases: <bad@example......com> Both are typos from 98f7ca7 and 8880f84 :( I can't remember whether my intention was to allow sub-domains to be specified in the host or not with these additional dots, but by placing it outside of the host means it can only be specified once per domain and by placing a + after the new grouping support for sub-domains is kept. Closes #4912
* hmac: Added a unit test for the HMAC hash generationSteve Holme2020-02-244-2/+96
| | | | Closes #4973