Commit d503c950 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

explicitly specify 'we accept everything', because some site does not accept...

explicitly specify 'we accept everything', because some site does not accept requests without having accept header.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41350 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 056590c0
......@@ -645,7 +645,8 @@ class ContributionTool(BaseTool):
url = urlparse.urlunsplit((url_tuple[0], url_tuple[1], quoted_path,
url_tuple[3], url_tuple[4]))
# build a new file from the url
url_file = urllib2.urlopen(url)
url_file = urllib2.urlopen(urllib2.Request(url,
headers={'Accept':'*/*'}))
data = url_file.read() # time out must be set or ... too long XXX
file_object = cStringIO.StringIO()
file_object.write(data)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment