Skip to content

"CURLOPT_FOLLOWLOCATION" preventing the response from being returned #22

@ayhid

Description

@ayhid

Hello,
In some cases when the php safe mode is enabled or an open_basedir is set on the server, the curl_setopt_array cannot set the CURLOPT_FOLLOWLOCATION option.
It also prevents the CURLOPT_RETURNTRANSFER option from being set as it's defined after in the following array:
$curlOptions += array( CURLOPT_URL => $url, CURLOPT_PORT => $this->options['http_port'], CURLOPT_USERAGENT => $this->options['user_agent'], CURLOPT_FOLLOWLOCATION => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => $this->options['timeout'] );

In my use case I just commented out the CURLOPT_FOLLOWLOCATION line and it seems to work very well.
I am not sure if it will be ever needed with echonest responses.

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