send accept header during crawl
authorChristian Weiske <cweiske@cweiske.de>
Wed, 10 Feb 2016 16:09:56 +0000 (17:09 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Wed, 10 Feb 2016 16:09:56 +0000 (17:09 +0100)
src/phinde/Crawler.php

index 53320ec..f3158aa 100644 (file)
@@ -28,6 +28,10 @@ class Crawler
     protected function fetch($url)
     {
         $req = new HttpRequest($url);
+        $req->setHeader(
+            'accept',
+            implode(',', array_keys(static::$supportedIndexTypes))
+        );
         $res = $req->send();
         if ($res->getStatus() !== 200) {
             throw new \Exception(