Re: cvs: php4 /ext/curl curl.c php_curl.h
| From: | Sterling Hughes | Date: | Mon, 30 Apr 2001 06:48:45 +0000 |
| Subject: | Re: cvs: php4 /ext/curl curl.c php_curl.h | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-5404@lists.php.net to get a copy of this message | ||
On 30 Apr 2001, Stig Sæther Bakken wrote:
> ["Sterling Hughes" <sterling@designmultimedia.com>]
> > sterling Mon Apr 30 07:36:20 2001 EDT
> >
> > Modified files:
> > /php4/ext/curl curl.c php_curl.h
> > Log:
> > # Ok, big ass change list. Most of the changes are NEW's worthy, so
> > # I'll enter them directly there, not here.... The non-newsworthy code
> > # is:
> >
> > Added REGISTER_CURL_CONSTANT() a wrapper around REGISTER_LONG_CONSTANT()
> > Re-vamp the internal php_curl structure.
> > Properly free allocated slist's and HttpPost structures
> > many whitespace changes
> > speed improvements (in the post handling and slist area's)
> >
> > # Furthermore, as a side note, while the code I'm committing is correct,
> > # no one will be able to compile it yet and test it, as it requires a
> > # patched version of curl (if you really want to try it out and can't
> > # wait a day or two, send me a private mail)
>
> Sterling,
>
> I've had problems setting HTTP headers with the curl extension before
> this commit (it segfaults). Does your curl patch have anything to do
> with that? That'd be nice, then I can remove my hardcoding of the
> POST content-type to text/xml. :-P
>
Already fixed that a while ago (I think :). It seems to work fine for me:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.php.net/index.php");
curl_setopt($ch, CURLOPT_HTTPHEADERS, array("Content-type: text/html"));
curl_exec($ch);
curl_close($ch);
If your willing to try it, let me know and I'll e-mail you (and updated
version of) the cURL patch I sent out earlier, along with instructions
(you need the cvs of cURL).
-Sterling