diff options
author | David Flatz | 2025-09-12 08:32:32 +0200 |
---|---|---|
committer | David Flatz | 2025-09-12 08:34:24 +0200 |
commit | 38412ad5783e22834c01b5fdbbc8baca34dbdcb1 (patch) | |
tree | 494e68d2fadefe8ec2f9e84c68d0f89baa21ab16 | |
parent | cd78478397cdae2686ce90f2bb18678fc10a14f2 (diff) | |
download | itools-38412ad5783e22834c01b5fdbbc8baca34dbdcb1.tar.gz itools-38412ad5783e22834c01b5fdbbc8baca34dbdcb1.tar.bz2 itools-38412ad5783e22834c01b5fdbbc8baca34dbdcb1.zip |
Reenable connection reuse since performance hit is too big; expose option to force a fresh connection instead so that affected forking scripts can work around the problem that open connections from parent get closed by exiting childrenHEADmaster
-rw-r--r-- | it_url.class | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/it_url.class b/it_url.class index 26390eb..50d7152 100644 --- a/it_url.class +++ b/it_url.class @@ -264,7 +264,7 @@ static function curl_opts($p=array()) $add += [CURLOPT_ENCODING => $p['accept_encoding']]; # NOTE: the curl library renamed the option to CURLOPT_ACCEPT_ENCODING, in php both are possible, CURLOPT_ENCODING is documented return $add + [ - CURLOPT_FORBID_REUSE => true, + CURLOPT_FRESH_CONNECT => $p['fresh_con'] ? true : false, CURLOPT_HEADER => false, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT_MS => $p['totaltimeout'] * 1000, # use _MS to support fractions of seconds @@ -290,6 +290,7 @@ static function curl_opts($p=array()) * @param $p['data'] POST data array with key-value pairs * @param $p['files'] [fieldname => filename] of files to upload * @param $p['method'] different HTTP method + * @param $p['fresh_con'] force a fresh connection instead of a cached one * @param $p['verbose'] generate and capture curl verbose output in $this->verbose and alert mails */ |