-
Notifications
You must be signed in to change notification settings - Fork 246
Description
Line 114 in 750aec7
| // Returns true iff 'url' is allowed to be fetched by any member of the |
It says returns true iff any user agent in the vector is allowed to crawl. In fact, what it appears to me that it does is effectively collapse all rules that apply to any of the user agents in the vector into a single ruleset and then evaluate against that. That isn't always the same as any in the list being allowed.
e.g.
robots.txt:
User-agent: googlebot
Disallow: /foo/
if we call this method against the url /foo/ with a vector containing both googlebot and otherbot, it will return FALSE even though clearly otherbot is allowed to crawl /foo/ because (as I understand it) it's doing the equivalent of finding all rules that apply to either ua and collapsing into a single ruleset like:
User-agent: googlebot
User-agent: otherbot
Disallow: /foo/
So I think the comment is misleading, but would appreciate more eyes on the question!