Skip to content

Issue with SSL when passing a user agent #8

@itdoell

Description

@itdoell

Depending on which site you're trying to access, the script is goes into an infinite loop infinite loop. The Google homepage is one of the sites breaking.

$mc = EpiCurl::getInstance();
$url = 'https://www.google.com';
$ch = curl_init($url);
$options = array(
          CURLOPT_USERAGENT => "Mozilla/5.0 (X11; Linux i686; rv:10.0) Gecko/20100101 Firefox/10.0",
          CURLOPT_RETURNTRANSFER => true,
          CURLOPT_HEADER => false
        );
curl_setopt_array($ch, $options);
echo $mc->addCurl($ch)->data;

If I try to run that it goes into an infinite loop. If the user agent is removed, it will return the result. Also works as expected when not using EpiCurl for multi curl. I cannot seem to figure out what is causing this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions