webcheck commit: r405 - webcheck/schemes
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
webcheck commit: r405 - webcheck/schemes
- From: Commits of the webcheck project <webcheck-commits [at] lists.arthurdejong.org>
- To: webcheck-commits [at] lists.arthurdejong.org
- Reply-to: webcheck-users [at] lists.arthurdejong.org
- Subject: webcheck commit: r405 - webcheck/schemes
- Date: Sat, 11 Sep 2010 14:43:37 +0200 (CEST)
Author: arthur
Date: Sat Sep 11 14:43:35 2010
New Revision: 405
URL: http://arthurdejong.org/viewvc/webcheck?view=rev&revision=405
Log:
add a Referer header if possible (thanks Devin Bayer)
Modified:
webcheck/schemes/http.py
Modified: webcheck/schemes/http.py
==============================================================================
--- webcheck/schemes/http.py Sat Sep 11 14:31:33 2010 (r404)
+++ webcheck/schemes/http.py Sat Sep 11 14:43:35 2010 (r405)
@@ -83,6 +83,8 @@
# start the request
conn.putrequest('GET', path, skip_host=True)
conn.putheader('Host', urllib.splitport(netloc)[0])
+ if len(link.parents) > 0:
+ conn.putheader('Referer', list(link.parents)[0].url)
if userpass is not None:
(user, passwd) = urllib.splitpasswd(userpass)
conn.putheader(
--
To unsubscribe send an email to
webcheck-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/webcheck-commits
- webcheck commit: r405 - webcheck/schemes,
Commits of the webcheck project