curl-library
PUT method & Perl Curl::Easy Re: Perl-curl-lib : PUT method & CURL_WRITEFUNCTION
Date: Sat, 23 Jun 2001 18:18:46 +0200 (CEST)
I have made more test and I got some "segmentation fault" for PUT method.
Some strange issue with Curl::Easy
here it is the script :
$url = "http://127.0.0.1/ipfc/broleque.ok";
if (($curl = Curl::easy::init()) != 0) {
print "ok\n";
} else {
print "ko\n";
}
Curl::easy::setopt($curl, CURLOPT_NOPROGRESS, 1);
Curl::easy::setopt($curl, CURLOPT_TIMEOUT, 30);
my @myheaders;
$myheaders[0] = "Server: wrapper-y";
$myheaders[1] = "User-Agent: ipfc-wrap";
open (DESC, "/etc/hosts");
Curl::easy::setopt($curl, CURLOPT_INFILE, DESC);
Curl::easy::setopt($curl, CURLOPT_HTTPHEADER, \@myheaders);
Curl::easy::setopt($curl, CURLOPT_URL, $url);
Curl::easy::setopt($curl, CURLOPT_PUT, 1);
if (Curl::easy::perform($curl) != 0) {
print "not ";
};
Curl::easy::cleanup($curl);
close (DESC);
But when I run the script I got a segmentation fault.
The PUT is passing on the apache site (the files is created) but without
the content and the perl script exit on seg fault sig11.
Core was generated by `perl tst-curl.pl'.
Program terminated with signal 11, Segmentation fault.
#0 0x400aa1f1 in ?? ()
(gdb)
Is it a issue between file descriptor and the XS interface to C call
? maybe... Do you have any comment on that ? or is it a known issue ?
Thanks a lot.
alx
_______________________________________________
Curl-library mailing list
http://curl.haxx.se/libcurl/
Received on 2001-06-23