summaryrefslogtreecommitdiff
path: root/lib/pipeline.c
Commit message (Collapse)AuthorAgeFilesLines
* PIPELINING_SERVER_BL: cleanup the internal list useDaniel Stenberg2017-06-191-22/+15
| | | | | | | | | | | The list was freed incorrectly since the llist refactor of cbae73e1dd959. Added test 1550 to verify that it works and avoid future regressions. Reported-by: Pascal Terjan Fixes #1584 Closes #1585
* multi: use a fixed array of timers instead of mallocDaniel Stenberg2017-05-101-2/+2
| | | | | | | | | | ... since the total amount is low this is faster, easier and reduces memory overhead. Also, Curl_expire_done() can now mark an expire timeout as done so that it never times out. Closes #1472
* multi: assign IDs to all timers and make each timer singletonDaniel Stenberg2017-05-101-2/+2
| | | | | | | A) reduces the timeout lists drastically B) prevents a lot of superfluous loops for timers that expires "in vain" when it has actually already been extended to fire later on
* llist: no longer uses mallocDaniel Stenberg2017-04-221-32/+20
| | | | | | | | | | | | The 'list element' struct now has to be within the data that is being added to the list. Removes 16.6% (tiny) mallocs from a simple HTTP transfer. (96 => 80) Also removed return codes since the llist functions can't fail now. Test 1300 updated accordingly. Closes #1435
* llist: replace Curl_llist_alloc with Curl_llist_initDaniel Stenberg2017-04-041-49/+32
| | | | | | | | No longer allocate the curl_llist head struct for lists separately. Removes 17 (15%) tiny allocations in a normal "curl localhost" invoke. closes #1381
* strcasecompare: all case insensitive string compares ignore locale nowDaniel Stenberg2016-10-311-3/+3
| | | | | We had some confusions on when each function was used. We should not act differently on different locales anyway.
* multi: make Curl_expire() work with 0 ms timeoutsDaniel Stenberg2016-08-041-3/+3
| | | | | | | | | | Previously, passing a timeout of zero to Curl_expire() was a magic code for clearing all timeouts for the handle. That is now instead made with the new Curl_expire_clear() function and thus a 0 timeout is fine to set and will trigger a timeout ASAP. This will help removing short delays, in particular notable when doing HTTP/2.
* library: Fix memory leaks found during static analysisMiroslav Franc2016-07-141-2/+7
| | | | Closes https://github.com/curl/curl/pull/913
* internals: rename the SessionHandle struct to Curl_easyDaniel Stenberg2016-06-221-13/+13
|
* pipeline: Sanity check pipeline pointer before accessing it.Anders Bakken2016-03-081-4/+5
| | | | | | | | | | | | I got a crash with this stack: curl/lib/url.c:2873 (Curl_removeHandleFromPipeline) curl/lib/url.c:2919 (Curl_getoff_all_pipelines) curl/lib/multi.c:561 (curl_multi_remove_handle) curl/lib/url.c:415 (Curl_close) curl/lib/easy.c:859 (curl_easy_cleanup) Closes #704
* URLs: change all http:// URLs to https://Daniel Stenberg2016-02-031-1/+1
|
* pipeline: switch some code over to functionsDaniel Stenberg2015-05-181-2/+89
| | | | | ... to "compartmentalize" a bit and make it easier to change behavior when multiplexing is used instead of good old pipelining.
* pipeline: move function to pipeline.c and make staticDaniel Stenberg2015-05-181-1/+10
| | | | ... as it was only used from there.
* bundles: merged into conncache.cDaniel Stenberg2015-05-121-1/+0
| | | | | | All the existing Curl_bundle* functions were only ever used from within the conncache.c file, so I moved them over and made them static (and removed the Curl_ prefix).
* free: instead of Curl_safefree()Daniel Stenberg2015-03-161-5/+3
| | | | | | | | | | | | Since we just started make use of free(NULL) in order to simplify code, this change takes it a step further and: - converts lots of Curl_safefree() calls to good old free() - makes Curl_safefree() not check the pointer before free() The (new) rule of thumb is: if you really want a function call that frees a pointer and then assigns it to NULL, then use Curl_safefree(). But we will prefer just using free() from now on.
* code cleanup: We prefer 'CURLcode result'Steve Holme2014-10-281-3/+3
|
* pipelining: only output "is not blacklisted" in debug buildsDaniel Stenberg2014-10-241-1/+1
|
* Curl_pipeline_server_blacklisted: handle a NULL server nameDaniel Stenberg2014-10-031-1/+1
| | | | | | Coverity CID 1215284. The server name is extracted with Curl_copy_header_value() and passed in to this function, and copy_header_value can actually can fail and return NULL.
* pipeline: Fixed a NULL pointer dereference on OOMDan Fandrich2014-01-311-4/+14
|
* info: remove debug outputDaniel Stenberg2014-01-081-7/+0
| | | | | | | | Removed some of the infof() calls that were added with the recent pipeline improvements but they're not useful to the vast majority of readers and the pipelining seems to fundamentaly work - the debugging outputs can easily be added there if debugging these functions is needed again.
* pipeline: remove print_pipeline()Daniel Stenberg2014-01-031-2/+6
| | | | | | | | | | | This is a debug function only and serves no purpose in production code, it only slows things down. I left the code #ifdef'ed for possible future pipeline debugging. Also, this was a global function without proper namespace usage. Reported-by: He Qin Bug: http://curl.haxx.se/bug/view.cgi?id=1320
* mprintf: Replaced internal usage of FORMAT_OFF_T and FORMAT_OFF_TUSteve Holme2013-12-311-2/+2
| | | | | | | | | Following commit 0aafd77fa4c6f2, replaced the internal usage of FORMAT_OFF_T and FORMAT_OFF_TU with the external versions that we expect API programmers to use. This negates the need for separate definitions which were subtly different under different platforms/compilers.
* string formatting: fix 15+ printf-style format stringsYang Tse2013-07-241-2/+2
|
* string formatting: fix 25+ printf-style format stringsYang Tse2013-07-241-8/+10
|
* pipelining: Remove dead code.Linus Nielsen Feltzing2013-03-141-35/+0
|
* Multiple pipelines and limiting the number of connections.Linus Nielsen Feltzing2013-03-131-0/+366
Introducing a number of options to the multi interface that allows for multiple pipelines to the same host, in order to optimize the balance between the penalty for opening new connections and the potential pipelining latency. Two new options for limiting the number of connections: CURLMOPT_MAX_HOST_CONNECTIONS - Limits the number of running connections to the same host. When adding a handle that exceeds this limit, that handle will be put in a pending state until another handle is finished, so we can reuse the connection. CURLMOPT_MAX_TOTAL_CONNECTIONS - Limits the number of connections in total. When adding a handle that exceeds this limit, that handle will be put in a pending state until another handle is finished. The free connection will then be reused, if possible, or closed if the pending handle can't reuse it. Several new options for pipelining: CURLMOPT_MAX_PIPELINE_LENGTH - Limits the pipeling length. If a pipeline is "full" when a connection is to be reused, a new connection will be opened if the CURLMOPT_MAX_xxx_CONNECTIONS limits allow it. If not, the handle will be put in a pending state until a connection is ready (either free or a pipe got shorter). CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE - A pipelined connection will not be reused if it is currently processing a transfer with a content length that is larger than this. CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE - A pipelined connection will not be reused if it is currently processing a chunk larger than this. CURLMOPT_PIPELINING_SITE_BL - A blacklist of hosts that don't allow pipelining. CURLMOPT_PIPELINING_SERVER_BL - A blacklist of server types that don't allow pipelining. See the curl_multi_setopt() man page for details.