data need not be prefixed with http..

This commit is contained in:
Sangeeth Saravanaraj 2015-05-01 14:32:36 +05:30
parent 61a7cecb31
commit d60a652259
2 changed files with 3 additions and 3 deletions

View File

@ -109,7 +109,7 @@ class XEP_0332(BasePlugin):
iq['http-req']['resource'] = resource
iq['http-req']['version'] = '1.1' # TODO: set this implicitly
if data is not None:
iq['http-req']['http-data'] = data
iq['http-req']['data'] = data
return iq.send(
timeout=kwargs.get('timeout', None),
block=kwargs.get('block', True),
@ -128,7 +128,7 @@ class XEP_0332(BasePlugin):
iq['http-resp']['message'] = message
iq['http-resp']['version'] = '1.1' # TODO: set this implicitly
if data is not None:
iq['http-resp']['http-data'] = data
iq['http-resp']['data'] = data
return iq.send(
timeout=kwargs.get('timeout', None),
block=kwargs.get('block', True),

View File

@ -18,7 +18,7 @@ class HTTPData(ElementBase):
name = 'data'
namespace = 'urn:xmpp:http'
interfaces = set(['data'])
plugin_attrib = 'http-data'
plugin_attrib = 'data'
is_extension = True
def get_data(self, encoding='text'):