From: Christian Weiske Date: Wed, 10 Feb 2016 16:09:56 +0000 (+0100) Subject: send accept header during crawl X-Git-Tag: v0.1.0~8 X-Git-Url: https://git.cweiske.de/phinde.git/commitdiff_plain/b018834e5c337be762cf9809e69e341061f4638a send accept header during crawl --- diff --git a/src/phinde/Crawler.php b/src/phinde/Crawler.php index 53320ec..f3158aa 100644 --- a/src/phinde/Crawler.php +++ b/src/phinde/Crawler.php @@ -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(