Commit 6e97408c authored by Gregor Morrill's avatar Gregor Morrill

Fixed bug with Mf2\fetch() where header size was being trimmed even though the...

Fixed bug with Mf2\fetch() where header size was being trimmed even though the cURL options are not returning a header.
The response from the cURL request is only the HTML so shouldn't need any trimming.
parent c80db98f
......@@ -69,7 +69,7 @@ function fetch($url, $convertClassic = true, &$curlInfo=null) {
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_MAXREDIRS, 5);
$response = curl_exec($ch);
$html = curl_exec($ch);
$info = $curlInfo = curl_getinfo($ch);
curl_close($ch);
......@@ -78,7 +78,6 @@ function fetch($url, $convertClassic = true, &$curlInfo=null) {
return null;
}
$html = mb_substr($response, $info['header_size']);
return parse($html, $url, $convertClassic);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment