This allows simplepie to set if-modified-since/if-none-match headers
to efficiently test if a feed has been updated without recieving the
whole content
$curl = new curl();
$curl->setopt(array('CURLOPT_HEADER'=>true));
+ if ($headers !== null) {
+ // translate simplepie headers to those class curl expects
+ foreach($headers as $headername => $headervalue){
+ $headerstr = "{$headername}: {$headervalue}";
+ $curl->setHeader($headerstr);
+ }
+ }
+
$this->headers = $curl->get($url);
if ($curl->error) {