Fix headers definition

Based on what's done inside urllib2.py.
master
pictuga 2013-07-17 14:41:29 +02:00
parent d3213ea1e7
commit 71129b5898
1 changed files with 2 additions and 2 deletions

View File

@ -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):