Commit 383a32f7 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

send http referer when adding an ERP5 site to imitate the real request.

parent 57acb348
...@@ -12,7 +12,8 @@ erp5_catalog_storage = 'erp5_mysql_innodb_catalog' ...@@ -12,7 +12,8 @@ erp5_catalog_storage = 'erp5_mysql_innodb_catalog'
mysql_url = "%(sql_connection_string)s" mysql_url = "%(sql_connection_string)s"
header_dict = {'Authorization': 'Basic %%s' %% \ header_dict = {'Authorization': 'Basic %%s' %% \
base64.encodestring('%%s:%%s' %% (user, password)).strip()} base64.encodestring('%%s:%%s' %% (user, password)).strip(),
'Referer':'http://%%s/manage_addProduct/ERP5/addERP5Site' %% host}
zope_connection = httplib.HTTPConnection(host) zope_connection = httplib.HTTPConnection(host)
# Check if an ERP5 site is already created, as ERP5 does support having # Check if an ERP5 site is already created, as ERP5 does support having
......
...@@ -50,6 +50,7 @@ class ERP5Updater(object): ...@@ -50,6 +50,7 @@ class ERP5Updater(object):
base64string = base64.encodestring(authentication_string).strip() base64string = base64.encodestring(authentication_string).strip()
self.header_dict['Authorization'] = 'Basic %s' % base64string self.header_dict['Authorization'] = 'Basic %s' % base64string
self.header_dict['Referer'] = 'http://%s/manage_addProduct/ERP5/addERP5Site' % host
self.host = host self.host = host
self.site_id = site_id self.site_id = site_id
......
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