Re: Fixes for curl_setopt() and nullable values

From: Date: Mon, 02 Dec 2013 08:24:13 +0000
Subject: Re: Fixes for curl_setopt() and nullable values
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-70463@lists.php.net to get a copy of this message
On Wed, Nov 27, 2013 at 4:29 PM, Tjerk Meesters <tjerk.meesters@gmail.com>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

« previous php.internals (#70463) next »