summaryrefslogtreecommitdiff
path: root/lib/transfer.h
Commit message (Collapse)AuthorAgeFilesLines
* cleanup: remove the 'numsocks' argument used in many placesDaniel Stenberg2019-07-301-2/+1
| | | | | | | | | It was used (intended) to pass in the size of the 'socks' array that is also passed to these functions, but was rarely actually checked/used and the array is defined to a fixed size of MAX_SOCKSPEREASYHANDLE entries that should be used instead. Closes #4169
* headers: Remove no longer exported functionsDaniel Gustafsson2019-07-101-1/+0
| | | | | | | | | | | | | | | | | | | | There were a leftover few prototypes of Curl_ functions that we used to export but no longer do, this removes those prototypes and cleans up any comments still referring to them. Curl_write32_le(), Curl_strcpy_url(), Curl_strlen_url(), Curl_up_free() Curl_concat_url(), Curl_detach_connnection(), Curl_http_setup_conn() were made static in 05b100aee247bb9bec8e9a1b0166496aa4248d1c. Curl_http_perhapsrewind() made static in 574aecee208f79d391f10d57520b3. For the remainder, I didn't trawl the Git logs hard enough to capture their exact time of deletion, but they were all gone: Curl_splayprint(), Curl_http2_send_request(), Curl_global_host_cache_dtor(), Curl_scan_cache_used(), Curl_hostcache_destroy(), Curl_second_connect(), Curl_http_auth_stage() and Curl_close_connections(). Closes #4096 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* http2: call done_sending on end of uploadDaniel Stenberg2019-06-241-0/+3
| | | | | | | | | To make sure a HTTP/2 stream registers the end of stream. Bug #4043 made me find this problem but this fix doesn't correct the reported issue. Closes #4068
* urldata: simplify bytecountersDaniel Stenberg2019-03-011-11/+9
| | | | | | | | | | | | | - no need to have them protocol specific - no need to set pointers to them with the Curl_setup_transfer() call - make Curl_setup_transfer() operate on a transfer pointer, not connection - switch some counters from long to the more proper curl_off_t type Closes #3627
* whitespace fixesViktor Szakats2018-09-231-1/+0
| | | | | | | | | | | - replace tabs with spaces where possible - remove line ending spaces - remove double/triple newlines at EOF - fix a non-UTF-8 character - cleanup a few indentations/line continuations in manual examples Closes https://github.com/curl/curl/pull/3037
* all: s/int/size_t cleanupDaniel Stenberg2018-09-011-1/+2
| | | | | | Assisted-by: Rikard Falkeborn Closes #2922
* upload: allocate upload buffer on-demandDaniel Stenberg2018-08-181-0/+1
| | | | | | | Saves 16KB on the easy handle for operations that don't need that buffer. Part 1 of #2888
* HTTP: allow "header;" to replace an internal header with a blank oneDaniel Stenberg2018-03-111-1/+2
| | | | | | Reported-by: Michael Kaufmann Fixes #2357 Closes #2362
* Curl_checkheaders: make it available for IMAP and SMTP tooDaniel Stenberg2017-09-111-1/+4
| | | | | | ... not only HTTP uses this now. Closes #1875
* speed caps: not based on average speeds anymoreOlivier Brunel2016-09-041-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | Speed limits (from CURLOPT_MAX_RECV_SPEED_LARGE & CURLOPT_MAX_SEND_SPEED_LARGE) were applied simply by comparing limits with the cumulative average speed of the entire transfer; While this might work at times with good/constant connections, in other cases it can result to the limits simply being "ignored" for more than "short bursts" (as told in man page). Consider a download that goes on much slower than the limit for some time (because bandwidth is used elsewhere, server is slow, whatever the reason), then once things get better, curl would simply ignore the limit up until the average speed (since the beginning of the transfer) reached the limit. This could prove the limit useless to effectively avoid using the entire bandwidth (at least for quite some time). So instead, we now use a "moving starting point" as reference, and every time at least as much as the limit as been transferred, we can reset this starting point to the current position. This gets a good limiting effect that applies to the "current speed" with instant reactivity (in case of sudden speed burst). Closes #971
* transfer: return without select when the read loop reached maxcountDaniel Stenberg2016-08-041-3/+2
| | | | | | | | | | | Regression added in 790d6de48515. The was then added to avoid one particular transfer to starve out others. But when aborting due to reading the maxcount, the connection must be marked to be read from again without first doing a select as for some protocols (like SFTP/SCP) the data may already have been read off the socket. Reported-by: Dan Donahue Bug: https://curl.haxx.se/mail/lib-2016-07/0057.html
* internals: rename the SessionHandle struct to Curl_easyDaniel Stenberg2016-06-221-6/+6
|
* multi: multi_reconnect_request is the former Curl_reconnect_requestDaniel Stenberg2016-03-301-2/+1
| | | | now a file local function in multi.c
* URLs: change all http:// URLs to https://Daniel Stenberg2016-02-031-1/+1
|
* fread_func: move callback pointer from set to state structDaniel Stenberg2015-10-151-0/+2
| | | | | | | | | | | | | | | | ... and assign it from the set.fread_func_set pointer in the Curl_init_CONNECT function. This A) avoids that we have code that assigns fields in the 'set' struct (which we always knew was bad) and more importantly B) it makes it impossibly to accidentally leave the wrong value for when the handle is re-used etc. Introducing a state-init functionality in multi.c, so that we can set a specific function to get called when we enter a state. The Curl_init_CONNECT is thus called when switching to the CONNECT state. Bug: https://github.com/bagder/curl/issues/346 Closes #346
* read_callback: move to SessionHandle from connectdataDaniel Stenberg2015-05-201-2/+3
| | | | | | | With many easy handles using the same connection for multiplexing, it is important we store and keep the transfer-oriented stuff in the SessionHandle so that callbacks and callback data work fine even when many easy handles share the same physical connection.
* Curl_perfom: removedDaniel Stenberg2013-02-011-2/+2
| | | | | | Curl_perfom is no longer used anywhere since the always-multi commit c43127414d89ccb9, and some related functions were used only from within Curl_perfom.
* Revert changes relative to lib/*.[ch] recent renamingYang Tse2013-01-061-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts renaming and usage of lib/*.h header files done 28-12-2012, reverting 2 commits: f871de0... build: make use of 76 lib/*.h renamed files ffd8e12... build: rename 76 lib/*.h files This also reverts removal of redundant include guard (redundant thanks to changes in above commits) done 2-12-2013, reverting 1 commit: c087374... curl_setup.h: remove redundant include guard This also reverts renaming and usage of lib/*.c source files done 3-12-2013, reverting 3 commits: 13606bb... build: make use of 93 lib/*.c renamed files 5b6e792... build: rename 93 lib/*.c files 7d83dff... build: commit 13606bbfde follow-up 1 Start of related discussion thread: http://curl.haxx.se/mail/lib-2013-01/0012.html Asking for confirmation on pushing this revertion commit: http://curl.haxx.se/mail/lib-2013-01/0048.html Confirmation summary: http://curl.haxx.se/mail/lib-2013-01/0079.html NOTICE: The list of 2 files that have been modified by other intermixed commits, while renamed, and also by at least one of the 6 commits this one reverts follows below. These 2 files will exhibit a hole in history unless git's '--follow' option is used when viewing logs. lib/curl_imap.h lib/curl_smtp.h
* build: rename 76 lib/*.h filesYang Tse2012-12-281-70/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 76 private header files renamed to use our standard naming scheme. This commit only does the file renaming. ---------------------------------------- renamed: amigaos.h -> curl_amigaos.h renamed: arpa_telnet.h -> curl_arpa_telnet.h renamed: asyn.h -> curl_asyn.h renamed: axtls.h -> curl_axtls.h renamed: bundles.h -> curl_bundles.h renamed: conncache.h -> curl_conncache.h renamed: connect.h -> curl_connect.h renamed: content_encoding.h -> curl_content_encoding.h renamed: cookie.h -> curl_cookie.h renamed: cyassl.h -> curl_cyassl.h renamed: dict.h -> curl_dict.h renamed: easyif.h -> curl_easyif.h renamed: escape.h -> curl_escape.h renamed: file.h -> curl_file.h renamed: fileinfo.h -> curl_fileinfo.h renamed: formdata.h -> curl_formdata.h renamed: ftp.h -> curl_ftp.h renamed: ftplistparser.h -> curl_ftplistparser.h renamed: getinfo.h -> curl_getinfo.h renamed: gopher.h -> curl_gopher.h renamed: gtls.h -> curl_gtls.h renamed: hash.h -> curl_hash.h renamed: hostcheck.h -> curl_hostcheck.h renamed: hostip.h -> curl_hostip.h renamed: http.h -> curl_http.h renamed: http_chunks.h -> curl_http_chunks.h renamed: http_digest.h -> curl_http_digest.h renamed: http_negotiate.h -> curl_http_negotiate.h renamed: http_proxy.h -> curl_http_proxy.h renamed: if2ip.h -> curl_if2ip.h renamed: imap.h -> curl_imap.h renamed: inet_ntop.h -> curl_inet_ntop.h renamed: inet_pton.h -> curl_inet_pton.h renamed: krb4.h -> curl_krb4.h renamed: llist.h -> curl_llist.h renamed: memdebug.h -> curl_memdebug.h renamed: multiif.h -> curl_multiif.h renamed: netrc.h -> curl_netrc.h renamed: non-ascii.h -> curl_non-ascii.h renamed: nonblock.h -> curl_nonblock.h renamed: nssg.h -> curl_nssg.h renamed: parsedate.h -> curl_parsedate.h renamed: pingpong.h -> curl_pingpong.h renamed: polarssl.h -> curl_polarssl.h renamed: pop3.h -> curl_pop3.h renamed: progress.h -> curl_progress.h renamed: qssl.h -> curl_qssl.h renamed: rawstr.h -> curl_rawstr.h renamed: rtsp.h -> curl_rtsp.h renamed: select.h -> curl_select.h renamed: sendf.h -> curl_sendf.h renamed: setup.h -> curl_setup.h renamed: setup_once.h -> curl_setup_once.h renamed: share.h -> curl_share.h renamed: slist.h -> curl_slist.h renamed: smtp.h -> curl_smtp.h renamed: sockaddr.h -> curl_sockaddr.h renamed: socks.h -> curl_socks.h renamed: speedcheck.h -> curl_speedcheck.h renamed: splay.h -> curl_splay.h renamed: ssh.h -> curl_ssh.h renamed: sslgen.h -> curl_sslgen.h renamed: ssluse.h -> curl_ssluse.h renamed: strdup.h -> curl_strdup.h renamed: strequal.h -> curl_strequal.h renamed: strerror.h -> curl_strerror.h renamed: strtok.h -> curl_strtok.h renamed: strtoofft.h -> curl_strtoofft.h renamed: telnet.h -> curl_telnet.h renamed: tftp.h -> curl_tftp.h renamed: timeval.h -> curl_timeval.h renamed: transfer.h -> curl_transfer.h renamed: url.h -> curl_url.h renamed: urldata.h -> curl_urldata.h renamed: warnless.h -> curl_warnless.h renamed: wildcard.h -> curl_wildcard.h ----------------------------------------
* lib/*.h: use our standard naming scheme for header inclusion guardsYang Tse2012-12-281-3/+4
|
* source cleanup: unify look, style and indent levelsDaniel Stenberg2011-04-271-2/+3
| | | | | By the use of a the new lib/checksrc.pl script that checks that our basic source style rules are followed.
* transfer: avoid insane conversion of time_tStefan Krause2011-03-041-1/+1
|
* transfer: add Curl_meets_timecondition()Dave Reisner2011-01-311-0/+1
| | | | | | | | This will be used by file_do() and Curl_readwrite() as a unified method of checking to see if a remote document meets the supplied CURLOPT_TIMEVAL and CURLOPT_TIMECONDITION. Signed-off-by: Dave Reisner <d@falconindy.com>
* Curl_setup_transfer: no longer returns anythingDaniel Stenberg2010-04-161-2/+2
| | | | | This function could only return CURLE_OK and by changing it to a void instead, we can simplify code all over.
* Make rate-limitation logic smootherBen Greear2010-03-261-0/+4
| | | | | | This gives a smoother rate limitation performance by using sub-second pauses and also taking the buffer sizes into account.
* remove the CVSish $Id$ linesDaniel Stenberg2010-03-241-1/+0
|
* - Andre Guibert de Bruet pointed out a missing return code check for aDaniel Stenberg2009-08-211-2/+2
| | | | | | strdup() that could lead to segfault if it returned NULL. I extended his suggest patch to now have Curl_retry_request() return a regular return code and better check that.
* - Lots of good work by Krister Johansen, mostly related to pipelining:Daniel Stenberg2009-08-211-0/+1
| | | | | | Fix SIGSEGV on free'd easy_conn when pipe unexpectedly breaks Fix data corruption issue with re-connected transfers Fix use after free if we're completed but easy_conn not NULL
* - To make it easier for applications that want lots of magic stuff done onDaniel Stenberg2008-04-301-2/+15
| | | | | | | | | redirections and thus cannot use CURLOPT_FOLLOWLOCATION easily, we now introduce the new CURLINFO_REDIRECT_URL option that lets applications extract the URL libcurl would've redirected to if it had been told to. This then enables the application to continue to that URL as it thinks is suitable, without having to re-implement the magic of creating the new URL from the Location: header etc. Test 1029 verifies it.
* Rearranged code and changed Curl_readwrite_init() and Curl_pre_readwrite() intoDaniel Stenberg2007-11-151-2/+0
| | | | | | do_init() and do_complete() which now are called first and last in the DO function. It simplified the flow in multi.c and the functions got more sensible names!
* Fixed some minor type mismatches and missing consts mainly found by splint.Dan Fandrich2007-08-271-1/+1
|
* update copyright yearYang Tse2007-04-031-1/+1
|
* - Ravi Pratap provided work on libcurl making pipelining more robust andDaniel Stenberg2007-02-211-0/+1
| | | | | | | | | | | | fixing some bugs: o Don't mix GET and POST requests in a pipeline o Fix the order in which requests are dispatched from the pipeline o Fixed several curl bugs with pipelining when the server is returning chunked encoding: * Added states to chunked parsing for final CRLF * Rewind buffer after parsing chunk with data remaining * Moved chunked header initializing to a spot just before receiving headers
* Update copyright year, since the file has been modifiedYang Tse2006-10-271-1/+1
|
* Major overhaul introducing http pipelining support and shared connectionDaniel Stenberg2006-09-071-1/+2
| | | | cache within the multi handle.
* First curl_multi_socket() commit. Should primarily be considered as an internalDaniel Stenberg2006-04-101-5/+3
| | | | code rearrange to fit the future better.
* Updated the copyright year since changes have been this year.Daniel Stenberg2005-03-311-1/+1
|
* Rename Curl_pretransfersec() to *_second_connect() since it does not justDaniel Stenberg2005-02-141-1/+1
| | | | do pretransfer stuff like Curl_pretransfer().
* Using the multi interface, and doing a requsted a re-used connection thatDaniel Stenberg2005-01-291-1/+1
| | | | | | gets closed just after the request has been sent failed and did not re-issue a request on a fresh reconnect like the easy interface did. Now it does! (define CURL_MULTIEASY, run test case 160)
* Cyrill Osterwalder posted a detailed analysis about a bug that occurs whenDaniel Stenberg2005-01-111-1/+1
| | | | | | | using a custom Host: header and curl fails to send a request on a re-used persistent connection and thus creates a new connection and resends it. It then sent two Host: headers. Cyrill's analysis was posted here: http://curl.haxx.se/mail/archive-2005-01/0022.html
* HTTP "auth done right". See lib/README.httpauthDaniel Stenberg2004-11-241-1/+1
|
* removed tabs and trailing whitespace from sourceDaniel Stenberg2004-10-061-5/+5
|
* The read callback can now return CURL_READFUNC_ABORT to stop a transfer.Daniel Stenberg2004-06-211-1/+1
|
* Alexander Krasnostavsky's FTP third party transfer (proxy) supportDaniel Stenberg2004-06-031-0/+1
|
* initial support for "uploading" to file:// URLsDaniel Stenberg2004-05-251-7/+9
|
* curl_socket_t mistakes cleanupDaniel Stenberg2004-03-101-5/+4
|
* Use curl_socket_t instead of int for holding sockets. The typedefs andDaniel Stenberg2004-03-091-3/+5
| | | | defines are in setup.h.
* use curl_off_t instead of off_t!Daniel Stenberg2004-01-221-3/+3
|
* updated year in the copyright stringDaniel Stenberg2004-01-071-1/+1
|
* David J Meyer's large file support.Daniel Stenberg2004-01-051-3/+3
|