summaryrefslogtreecommitdiffstats
path: root/Python/pyfpe.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2014-05-13 05:18:50 (GMT)
committerRaymond Hettinger <python@rcn.com>2014-05-13 05:18:50 (GMT)
commita5413c499702a74fdc50e4bc8e7e6a480856a1f9 (patch)
tree079266511a220614fb6b33699dc27e5102695ae1 /Python/pyfpe.c
parentc5945966aee2fb3ddd96d7521b245cdb9968afcb (diff)
downloadcpython-a5413c499702a74fdc50e4bc8e7e6a480856a1f9.zip
cpython-a5413c499702a74fdc50e4bc8e7e6a480856a1f9.tar.gz
cpython-a5413c499702a74fdc50e4bc8e7e6a480856a1f9.tar.bz2
Issue 21469: Mitigate risk of false positives with robotparser.
* Repair the broken link to norobots-rfc.txt. * HTTP response codes >= 500 treated as a failed read rather than as a not found. Not found means that we can assume the entire site is allowed. A 5xx server error tells us nothing. * A successful read() or parse() updates the mtime (which is defined to be "the time the robots.txt file was last fetched"). * The can_fetch() method returns False unless we've had a read() with a 2xx or 4xx response. This avoids false positives in the case where a user calls can_fetch() before calling read(). * I don't see any easy way to test this patch without hitting internet resources that might change or without use of mock objects that wouldn't provide must reassurance.
Diffstat (limited to 'Python/pyfpe.c')
0 files changed, 0 insertions, 0 deletions