From 71129b5898d5c975ddd585b1c70ea1fda7ec8808 Mon Sep 17 00:00:00 2001 From: pictuga Date: Wed, 17 Jul 2013 14:41:29 +0200 Subject: [PATCH] Fix headers definition Based on what's done inside urllib2.py. --- morss.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/morss.py b/morss.py index 245ddbe..0e09829 100644 --- a/morss.py +++ b/morss.py @@ -195,8 +195,8 @@ class HTMLDownloader(urllib2.HTTPCookieProcessor): def http_request(self, req): urllib2.HTTPCookieProcessor.http_request(self, req) - req.add_header('Accept-Encoding', 'gzip') - req.add_header('User-Agent', self.useragent) + req.add_unredirected_header('Accept-Encoding', 'gzip') + req.add_unredirected_header('User-Agent', self.useragent) return req def http_response(self, req, resp):