Commit b026eafa authored by Nicolas Delaby's avatar Nicolas Delaby

lxml supply xml delaration, no need t add it

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25389 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8dfa62ab
...@@ -901,13 +901,7 @@ class SynchronizationTool( SubscriptionSynchronization, ...@@ -901,13 +901,7 @@ class SynchronizationTool( SubscriptionSynchronization,
auth_handler, TimeoutHTTPHandler) auth_handler, TimeoutHTTPHandler)
urllib2.install_opener(opener) urllib2.install_opener(opener)
to_encode = {} to_encode = {}
head = '<?xml version="1.0" encoding="UTF-8"?>'
if content_type == self.CONTENT_TYPE['SYNCML_WBXML']:
#because xml2wbxml add the head to the xml
to_encode['text'] = xml to_encode['text'] = xml
else:
to_encode['text'] = head + xml
to_encode['sync_id'] = sync_id to_encode['sync_id'] = sync_id
headers = {'User-Agent':'ERP5SyncML', 'Content-Type':content_type} headers = {'User-Agent':'ERP5SyncML', 'Content-Type':content_type}
......
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