note 32043 added to function.curl-setopt
| From: | johannes dot grumboeck at porsche dot co dot at | Date: | Wed, 14 May 2003 16:19:35 +0000 |
| Subject: | note 32043 added to function.curl-setopt | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-47968@lists.php.net to get a copy of this message | ||
I've got the following simple request:
<?php
$ch = curl_init ("http://host/server-status");
curl_exec ($ch);
curl_close ($ch);
?>
But every time it took 15 sec. to fulfill the request. I checked every possible config and then I
found the reason in httpd.conf:
KeepAliveTimeout 15
But I didn't find an option to turn off keep-alive in cURL. So I used the following:
curl_setopt ($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
Now it works fine in less than 1 sec. but is this the only solution??? To turn back to HTTP/1.0 ???
Best regards,
greetings Johannes
--
http://www.php.net/manual/en/function.curl-setopt.php
http://master.php.net/manage/user-notes.php?action=edit+32043
http://master.php.net/manage/user-notes.php?action=delete+32043
http://master.php.net/manage/user-notes.php?action=reject+32043