Bug #71703 [Opn->Fbk]: Segfault when CURLOPT_HTTPHEADER empty array and reset
Edit report at https://bugs.php.net/bug.php?id=71703&edit=1
ID: 71703
Updated by: laruence@php.net
Reported by: giel at cyclesoftware dot nl
Summary: Segfault when CURLOPT_HTTPHEADER empty array and
reset
-Status: Open
+Status: Feedback
Type: Bug
Package: cURL related
Operating System: Ubuntu
PHP Version: 7.0.3
Block user comment: N
Private report: N
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php
for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
I can not reproduce this
Previous Comments:
------------------------------------------------------------------------
[2016-03-02 16:14:40] giel at cyclesoftware dot nl
Description:
------------
When the following code is executed it segfaults. Removing curl_setopt($ch, CURLOPT_HTTPHEADER,
array()); fixes the problem.
Test script:
---------------
<?php
$uri = "http://www.google.com";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $uri);
curl_setopt($ch, CURLOPT_HTTPHEADER, array());
curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36',));
?>
Actual result:
--------------
segfault
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71703&edit=1
Thread (5 messages)