HTTP improvements.
This commit is contained in:
parent
cc2a8df98f
commit
1333be7225
2 changed files with 1 additions and 2 deletions
|
@ -14,7 +14,7 @@ HtmlCopyright = u"Copyright © 2004-2008 "+HtmlAuthor
|
||||||
Url = configdata.url
|
Url = configdata.url
|
||||||
SupportUrl = Url + u"/issues"
|
SupportUrl = Url + u"/issues"
|
||||||
Email = configdata.author_email
|
Email = configdata.author_email
|
||||||
UserAgent = u"%s/%s (+%s)" % (AppName, Version, Url)
|
UserAgent = u"Mozilla/5.0 (compatible; %s/%s; +%s)" % (AppName, Version, Url)
|
||||||
Freeware = AppName+u""" comes with ABSOLUTELY NO WARRANTY!
|
Freeware = AppName+u""" comes with ABSOLUTELY NO WARRANTY!
|
||||||
This is free software, and you are welcome to redistribute it
|
This is free software, and you are welcome to redistribute it
|
||||||
under certain conditions. Look at the file `LICENSE' within this
|
under certain conditions. Look at the file `LICENSE' within this
|
||||||
|
|
|
@ -138,7 +138,6 @@ def urlopen(url, referrer=None, retries=5):
|
||||||
url = normaliseURL(url)
|
url = normaliseURL(url)
|
||||||
req = urllib2.Request(url)
|
req = urllib2.Request(url)
|
||||||
if referrer:
|
if referrer:
|
||||||
req.add_header('Referrer', referrer)
|
|
||||||
req.add_header('Referer', referrer)
|
req.add_header('Referer', referrer)
|
||||||
req.add_header('User-Agent', UserAgent)
|
req.add_header('User-Agent', UserAgent)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue