Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52446 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71683 invoked from network); 18 May 2011 18:06:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 May 2011 18:06:41 -0000 Authentication-Results: pb1.pair.com header.from=mtdowling@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=mtdowling@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.83.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: mtdowling@gmail.com X-Host-Fingerprint: 74.125.83.42 mail-gw0-f42.google.com Received: from [74.125.83.42] ([74.125.83.42:36373] helo=mail-gw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3A/06-32761-DAA04DD4 for ; Wed, 18 May 2011 14:06:37 -0400 Received: by gwb17 with SMTP id 17so720166gwb.29 for ; Wed, 18 May 2011 11:06:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=cb3/ijefa/anmbHj6KL5v0Ig6gNfVYcnR/sC+7y1j1M=; b=MGK6ACWPBW3ZNynCXBJAJMGRMrDiOpOgrM6F44HBUllAxM6PR3l1dTz/f8Rng17bkT AwV/JjHTlZRaGA/EpVJs77CPuAZLld5/OzmO0wuEe9+rQt/V+eQssETtfWZeSs2umyIL q+stK3AxxwFE4a5hZJvn4aiYvmqmQh21T7/5Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=ewkEXfshiRYYVakDsUPN6iPPn3Mu5iGgpE+UHizZMmUvSsZgFWXpBJdnAzgI/mYPxO vqfUqYdOEuccP5RxrOO2vhZoJdYrW1JTeNICdYBLPqJClE3tGat6W83kXmZqQVgYF38O q6jYs2zJ157sGtrTSFNOiBhBjZPXKSaknaw4Y= Received: by 10.100.216.13 with SMTP id o13mr1262965ang.167.1305741995120; Wed, 18 May 2011 11:06:35 -0700 (PDT) Received: from michael-dowlings-macbook-pro.local ([173.227.76.18]) by mx.google.com with ESMTPS id s11sm1253708anm.14.2011.05.18.11.06.33 (version=SSLv3 cipher=OTHER); Wed, 18 May 2011 11:06:34 -0700 (PDT) Message-ID: <4DD40B15.10808@gmail.com> Date: Wed, 18 May 2011 13:08:21 -0500 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [PATCH] curl_reset From: mtdowling@gmail.com (Michael Dowling) I submitted a patch to add a curl_reset function to the cURL extension. It would be great if this patch could find its way into the PHP 5.4 release. This is my first attempt at a patch, so a review and feedback would be greatly appreciated. Feature request: http://bugs.php.net/bug.php?id=54022 Patch: http://bugs.php.net/patch-display.php?bug_id=54022&patch=curl_reset&revision=latest Motivation: Many of the curl_setopt options can be removed from a handle using some careful option setting that removes a related option as a side effect, but some options cannot be removed directly or indirectly (e.g. CURLOPT_RANGE, CURLOPT_TIMEOUT, CURLOPT_RESUME_FROM, CURLOPT_HTTPAUTH, etc). Adding support for the curl_easy_reset method to the PHP bindings would allow PHP developers to more easily implement connection pooling and utilize persistent connections over HTTP/1.1. curl_easy_reset has been available since version 7.12.1 (http://curl.haxx.se/libcurl/c/curl_easy_reset.html): > Re-initializes all options previously set on a specified CURL handle to the default values. This puts back the handle to the same state as it was in when it was just created with curl_easy_init(3). It does not change the following information kept in the handle: live connections, the Session ID cache, the DNS cache, the cookies and shares. Thanks, Michael Dowling