From b018834e5c337be762cf9809e69e341061f4638a Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 10 Feb 2016 17:09:56 +0100 Subject: [PATCH] send accept header during crawl --- src/phinde/Crawler.php | 4 ++++ 1 file changed, 4 insertions(+) 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( -- 2.30.2