You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I didn't know whether to create this issue against python-xrd or django-wellknown, so bear with me. The core issue is that the default handler for the host-meta resource, wellknown.resources.HostMeta returns an xml.dom.minidom.Document instance instead of the XML that the DOM represents as a string. This is because the __call__ method returns the result of XRD.to_xml which in turn returns an xml.dom.minidom.Document instance.
So, depending on what you see as the source of the problem, there are a few different ways to fix this specific problem:
Modify the _render_xml function in xrd.py of python-xrd to return XML instead of an xml.dom.minidom.Document instance:
def _render_xml(xrd):
...
return doc.toxml()
Modify the to_xml method of the XRD class in xrd.py to return XML:
First of all, thanks for writing python-xrd and django-wellknown and making them available. Saved me a huge amount of time / effort.
Steps to reproduce:
Example output:
Expected:
I didn't know whether to create this issue against python-xrd or django-wellknown, so bear with me. The core issue is that the default handler for the host-meta resource,
wellknown.resources.HostMeta
returns anxml.dom.minidom.Document
instance instead of the XML that the DOM represents as a string. This is because the__call__
method returns the result ofXRD.to_xml
which in turn returns anxml.dom.minidom.Document
instance.So, depending on what you see as the source of the problem, there are a few different ways to fix this specific problem:
_render_xml
function in xrd.py of python-xrd to return XML instead of anxml.dom.minidom.Document
instance:to_xml
method of theXRD
class in xrd.py to return XML:__call__
method in theHostMeta
class in resources.py to do the call:The text was updated successfully, but these errors were encountered: