Subject: | change CURLOPTs takes no effect if Re-using connection |
Date: | Wed, 21 Mar 2012 09:03:16 +0100 |
To: | bug-www-curl [...] rt.cpan.org |
From: | David Schneider <dsd31g [...] gmail.com> |
hey folks
RHEL 5
libcurl: 7.15.5
WWW-Curl-4.15
i want perform a head-request and after some checks i want perform a
get request.
after i have made a head request and change CURLOPT_NOBODY,0 it
performs a head request again.
i have found out that the same script works on a Debian(6.0.3 squeez)
with libcurl 7.21.0-2
i could reproduce the bug on a OpenBSD(5.0) if i build WWW-Curl with
libcurl 7.15.5.
i don't know if it's really a www::curl problem or a bug in libcurl.
regards dave
-- my test script --
#!/usr/bin/perl
use strict;
my $curl;
open(NULL,">/dev/null");
use WWW::Curl::Easy;
$curl = WWW::Curl::Easy->new;
$curl->setopt(CURLOPT_URL,'http://www.perl.org/');
$curl->setopt(CURLOPT_VERBOSE,1);
$curl->setopt(CURLOPT_FILE,*NULL);
print "##PERFORM HEAD REQUEST\n";
$curl->setopt(CURLOPT_NOBODY,1);
$curl->perform;
print "##PERFORM GET REQUEST\n";
$curl->setopt(CURLOPT_NOBODY,0);
$curl->perform;
close(NULL);