2to3: urllib host

master
pictuga 2015-03-03 00:59:00 +08:00
parent 9bc5b0c7f7
commit 2f542005d1
1 changed files with 2 additions and 2 deletions

View File

@ -181,8 +181,8 @@ class UAHandler(BaseHandler):
class AutoRefererHandler(BaseHandler):
def http_request(self, req):
if req.get_host() != 'feeds.feedburner.com':
req.add_unredirected_header('Referer', 'http://%s' % req.get_host())
if req.host != 'feeds.feedburner.com':
req.add_unredirected_header('Referer', 'http://%s' % req.host)
return req
https_request = http_request