summaryrefslogtreecommitdiff
path: root/lib/file.c
AgeCommit message (Collapse)Author
2021-01-13Merge tag 'curl-7_74_0'nikita
7.74.0
2020-11-25file: avoid duplicated code sequenceEmil Engler
file_disconnect() is identical with file_do() except the function header but as the arguments are unused anyway so why not just return file_do() directly! Reviewed-by: Daniel Stenberg Closes #6249
2020-11-23urldata: remove 'void *protop' and create the union 'p'Daniel Stenberg
... to avoid the use of 'void *' for the protocol specific structs done per transfer. Closes #6238
2020-11-04curl.se: new homeDaniel Stenberg
Closes #6172
2020-09-22symbian: drop supportDaniel Stenberg
The OS is deprecated. I see no traces of anyone having actually built curl for Symbian after 2012. The public headers are unmodified. Closes #5989
2020-09-21Curl_handler: add 'family' to each protocolDaniel Stenberg
Makes get_protocol_family() faster and it moves the knowledge about the "families" to each protocol handler, where it belongs. Closes #5986
2020-09-14Merge tag 'curl-7_71_1'nikita
curl 7.71.1
2020-06-25escape: make the URL decode able to reject only %00 bytesDaniel Stenberg
... or all "control codes" or nothing. Assisted-by: Nicolas Sterchele
2020-04-30Merge tag 'curl-7_70_0'nikita
7.70.0
2020-04-11Revert "file: on Windows, refuse paths that start with \\"Daniel Stenberg
This reverts commit 1b71bc532bde8621fd3260843f8197182a467ff2. Reminded-by: Chris Roberts Bug: https://curl.haxx.se/mail/archive-2020-04/0013.html Closes #5215
2020-01-10Merge tag 'curl-7_68_0'ng0
7.68.0
2020-01-06file: fix copyright year rangeDaniel Stenberg
Follow-up to 1b71bc532bd
2020-01-06file: on Windows, refuse paths that start with \\Daniel Stenberg
... as that might cause an unexpected SMB connection to a given host name. Reported-by: Fernando Muñoz CVE-2019-15601 Bug: https://curl.haxx.se/docs/CVE-2019-15601.html
2019-04-12Merge tag 'curl-7_64_1' of https://github.com/curl/curlng0
7.64.1
2019-03-12file: fix "Checking if unsigned variable 'readcount' is less than zero."Daniel Stenberg
Pointed out by codacy Closes #3672
2019-01-12Merge tag 'curl-7_63_0'ng0
7.63.0
2018-11-23snprintf: renamed and we now only use msnprintf()Daniel Stenberg
The function does not return the same value as snprintf() normally does, so readers may be mislead into thinking the code works differently than it actually does. A different function name makes this easier to detect. Reported-by: Tomas Hoger Assisted-by: Daniel Gustafsson Fixes #3296 Closes #3297
2018-11-10Merge tag 'curl-7_62_0'Nils Gillmann
7.62.0 Signed-off-by: Nils Gillmann <ng0@n0.is>
2018-10-08FILE: fix CURLOPT_NOBODY and CURLOPT_HEADER outputDaniel Stenberg
Now FILE transfers send headers to the header callback like HTTP and other protocols. Also made curl_easy_getinfo(...CURLINFO_PROTOCOL...) work for FILE in the callbacks. Makes "curl -i file://.." and "curl -I file://.." work like before again. Applied the bold header logic to them too. Regression from c1c2762 (7.61.0) Reported-by: Shaun Jackman Fixes #3083 Closes #3101
2018-09-22url: use the URL API internally as wellDaniel Stenberg
... to make it a truly unified URL parser. Closes #3017
2018-09-11Merge tag 'curl-7_61_1'Nils Gillmann
curl 7.61.1 Signed-off-by: Nils Gillmann <ng0@n0.is>
2018-09-06CURLOPT_UPLOAD_BUFFERSIZE: set upload buffer sizeDaniel Stenberg
This is step 3 of #2888. Fixes #2888 Closes #2896
2018-09-01all: s/int/size_t cleanupDaniel Stenberg
Assisted-by: Rikard Falkeborn Closes #2922
2018-08-05Merge tag 'curl-7_61_0'Nils Gillmann
curl 7.61.0 Signed-off-by: Nils Gillmann <ng0@n0.is>
2018-06-11cppcheck: fix warningsMarian Klymov
- Get rid of variable that was generating false positive warning (unitialized) - Fix issues in tests - Reduce scope of several variables all over etc Closes #2631
2018-06-03spelling fixesViktor Szakats
Detected using the `codespell` tool (version 1.13.0). Also secure and fix an URL.
2018-03-30Merge tag 'curl-7_59_0' of https://github.com/curl/curlNils Gillmann
curl 7.59.0 Initial merge of upstream tag.
2018-02-01time_t-fixes: remove typecasts to 'long' for info.filetimeDaniel Stenberg
They're now wrong. Reported-by: Michael Kaufmann Closes #2277
2018-01-30file: Check the return code from Curl_range and bail out on errorMax Dymond
2018-01-30Curl_range: commonize FTP and FILE range handlingMax Dymond
Closes #2205
2017-12-03Merge tag 'curl-7_57_0'ng0
curl 7.57.0
2017-10-25time: rename Curl_tvnow to Curl_nowDaniel Stenberg
... since the 'tv' stood for timeval and this function does not return a timeval struct anymore. Also, cleaned up the Curl_timediff*() functions to avoid typecasts and clean up the descriptive comments. Closes #2011
2017-10-06Merge tag 'curl-7_56_0'ng0
curl 7.56.0
2017-09-23file_range: avoid integer overflow when figuring out byte rangeDaniel Stenberg
When trying to bump the value with one and the value is already at max, it causes an integer overflow. Closes #1908 Detected by oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3465 Assisted-by: Max Dymond
2017-09-11code style: use spaces around plusesDaniel Stenberg
2017-09-11code style: use spaces around equals signsDaniel Stenberg
2017-08-22Patchset for gnURL microfork:gnurl-7_55_1-1Christian Grothoff
* Patches to rename libcurl to libgnurl by Christian * Updated for latest curl using git cherry-pick by Jeff, Florian, ng0 * Patches to fix the testsuite (deleted tests/data/test1139, renamed reference from libcurl.* to libgnurl.*) by ng0 * Added guix-gnurl.scm which can be used to build this with guix prior to installing it. (author: ng0) * Further adjustments by ng0 * 7.55.0: Manual addition of a7bbbb7c368c6096802007f61f19a02e9d75285b and f864bd8c880d5a916379aa4f26f1c45fe370b282 from upstream master. * 7.55.1: Renamed include/curl to include/gnurl, a partial fix of https://gnunet.org/bugs/view.php?id=5122 Signed-off-by: ng0 <ng0@infotropique.org>
2017-08-22file: output the correct buffer to the userEven Rouault
Regression brought by 7c312f84ea930d8 (April 2017) CVE-2017-1000099 Bug: https://curl.haxx.se/docs/adv_20170809C.html Credit to OSS-Fuzz for the discovery
2017-08-22handler: refactor connection checkingMax Dymond
Add a new type of callback to Curl_handler which performs checks on the connection. Alter RTSP so that it uses this callback to do its own check on connection health.
2017-08-22file: make speedcheck use current time for checksDaniel Stenberg
... as it would previously just get the "now" timestamp before the transfer starts and then not update it again. Closes #1550
2017-08-22buffer: use data->set.buffer_size instead of BUFSIZEDaniel Stenberg
... to properly use the dynamically set buffer size!
2017-08-22upload: UPLOAD_BUFSIZE is now for the upload bufferDaniel Stenberg
2017-08-22file: use private buffer for C-L outputDaniel Stenberg
... instead of clobbering the download buffer.
2017-08-22Improve code readbilitySylvestre Ledru
... by removing the else branch after a return, break or continue. Closes #1310
2017-08-22CURLOPT_BUFFERSIZE: support enlarging receive bufferRichy Kim
Replace use of fixed macro BUFSIZE to define the size of the receive buffer. Reappropriate CURLOPT_BUFFERSIZE to include enlarging receive buffer size. Upon setting, resize buffer if larger than the current default size up to a MAX_BUFSIZE (512KB). This can benefit protocols like SFTP. Closes #1222
2017-08-22checksrc: code style: use 'char *name' styleDaniel Stenberg
2017-08-22file: fix compiler warningMichael Kaufmann
follow-up to 46133aa5
2017-08-22escape: avoid using curl_easy_unescape() internallyDaniel Stenberg
Since the internal Curl_urldecode() function has a better API.
2017-08-14strtoofft: reduce integer overflow risks globallyDaniel Stenberg
... make sure we bail out on overflows. Reported-by: Brian Carpenter Closes #1758
2017-08-07file: output the correct buffer to the userEven Rouault
Regression brought by 7c312f84ea930d8 (April 2017) CVE-2017-1000099 Bug: https://curl.haxx.se/docs/adv_20170809C.html Credit to OSS-Fuzz for the discovery