Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70463 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60982 invoked from network); 2 Dec 2013 08:24:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Dec 2013 08:24:18 -0000 Authentication-Results: pb1.pair.com smtp.mail=tjerk.meesters@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tjerk.meesters@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.175 as permitted sender) X-PHP-List-Original-Sender: tjerk.meesters@gmail.com X-Host-Fingerprint: 209.85.128.175 mail-ve0-f175.google.com Received: from [209.85.128.175] ([209.85.128.175:55464] helo=mail-ve0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 75/61-52529-0B34C925 for ; Mon, 02 Dec 2013 03:24:16 -0500 Received: by mail-ve0-f175.google.com with SMTP id jx11so8375641veb.6 for ; Mon, 02 Dec 2013 00:24:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=71l3YZtLS5H4+TfiTDrh3tTOgCqj939+A+Cp6jD2Qk8=; b=MuV70KKi/aYRx/qujzVCdQ+30Qq4aSca6bACsJxhIUoGZfunRAdD6hJjAzbCzt8OlQ UY5SPshDBjyKR022EYngI9Ji9OjmRKMK8fZQvLN3mampwr0un+X21ygBcXkz2IjEuGnG ApkUGMpi9X8ddIRkEo22vQtFBk45IE/NF+pSmHY2hqoFz+e7O7OVTnRynINfe8NzjbN+ 2XMG9Qhj2IQKe/KGMARLHuPm1L/c5xKVSGG6NG0Ld+RyZh62yy4VZ+7ebftpqSs2VuSe +GXa4tT8Ati5k/a70TWHvYyvn35FCVAL1KxjV2DVr44dERxY8WAY+uUGetv4gZuL8+Dz UzhQ== MIME-Version: 1.0 X-Received: by 10.58.248.198 with SMTP id yo6mr514420vec.40.1385972653802; Mon, 02 Dec 2013 00:24:13 -0800 (PST) Received: by 10.58.128.33 with HTTP; Mon, 2 Dec 2013 00:24:13 -0800 (PST) In-Reply-To: References: Date: Mon, 2 Dec 2013 16:24:13 +0800 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary=047d7bdc8f1ab2db9304ec88e7bf Subject: Re: Fixes for curl_setopt() and nullable values From: tjerk.meesters@gmail.com (Tjerk Meesters) --047d7bdc8f1ab2db9304ec88e7bf Content-Type: text/plain; charset=ISO-8859-1 On Wed, Nov 27, 2013 at 4:29 PM, Tjerk Meesters wrote: > Hi, > > A few weeks ago I stumbled upon the following question on stackoverflow: > > > http://stackoverflow.com/questions/4163865/how-to-reset-curlopt-customrequest > > It involves the CURLOPT_CUSTOMREQUEST option, which according to the > libcurl documentation can be set to NULL to restore the previous behaviour > of passing the method name based on the type of request. > > However, for string-based options the current code converts a NULL value > into an empty string, so it's impossible to revert the behaviour. > > After doing a quick hack I realized that there are more options that are > nullable, so I've decided to refactor some of the code to isolate the > string assignment; this makes adding future nullable options easier. > > This is the pull request: https://github.com/php/php-src/pull/531 > > It passes the test cases on my machine (couldn't test all of them because > file uploads aren't supported when you use internal web server), but I > would appreciate a second look. > I've made some tweaks based on Stanislav's suggestions. If there are no further objections, could someone merge this to master or give me (datibbaw) the required karma to do so? Thanks ^_^ -- -- Tjerk --047d7bdc8f1ab2db9304ec88e7bf--