git.cweiske.de
/
phinde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ba93b6e
)
send accept header during crawl
author
Christian Weiske
<cweiske@cweiske.de>
Wed, 10 Feb 2016 16:09:56 +0000
(17:09 +0100)
committer
Christian Weiske
<cweiske@cweiske.de>
Wed, 10 Feb 2016 16:09:56 +0000
(17:09 +0100)
src/phinde/Crawler.php
patch
|
blob
|
history
diff --git
a/src/phinde/Crawler.php
b/src/phinde/Crawler.php
index 53320ec6cb6101f3ce61b88bc0d28c283c4514dd..f3158aa07223979239f41bca742979d159f1aa2c 100644
(file)
--- a/
src/phinde/Crawler.php
+++ b/
src/phinde/Crawler.php
@@
-28,6
+28,10
@@
class Crawler
protected function fetch($url)
{
$req = new HttpRequest($url);
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(
$res = $req->send();
if ($res->getStatus() !== 200) {
throw new \Exception(