Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Update Services/Soundcloud.php #13

Merged
merged 1 commit into from

2 participants

@hmanprod

I ve add some fix in order to handle CURLOPT_HEADER correctly.
Perhaps it will be helpfull.
In my case curl_getinfo was returning a bad header_size so i has a problem to get use the json correctly.

Perhaps there change may to be to apply on this part to

$this->_lastHttpResponseHeaders = $this->_parseHttpHeaders(
substr($data, 0, $info['header_size'])
);

and use CURL_NOBODY options instead

@hmanprod hmanprod Update Services/Soundcloud.php
I ve add some fix in order to handle CURLOPT_HEADER correctly.
Perhaps it will be helpfull. 
In my case curl_getinfo was returning a bad header_size so i has a problem to get use the json correctly.
3aaeb49
@mptre mptre merged commit 8070975 into from
@mptre
Owner

Thx, merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 16, 2013
  1. @hmanprod

    Update Services/Soundcloud.php

    hmanprod authored
    I ve add some fix in order to handle CURLOPT_HEADER correctly.
    Perhaps it will be helpfull. 
    In my case curl_getinfo was returning a bad header_size so i has a problem to get use the json correctly.
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 1 deletion.
  1. +4 −1 Services/Soundcloud.php
View
5 Services/Soundcloud.php
@@ -924,7 +924,10 @@ protected function _request($url, $curlOptions = array())
$this->_lastHttpResponseHeaders = $this->_parseHttpHeaders(
substr($data, 0, $info['header_size'])
);
- $this->_lastHttpResponseBody = substr($data, $info['header_size']);
+ if(array_key_exists(CURLOPT_HEADER, $options) && !$options[CURLOPT_HEADER])
+ $this->_lastHttpResponseBody = $data;
+ else
+ $this->_lastHttpResponseBody = substr($data, $info['header_size']);
$this->_lastHttpResponseCode = $info['http_code'];
if ($this->_validResponseCode($this->_lastHttpResponseCode)) {
Something went wrong with that request. Please try again.