We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bca9862 commit 3259e58Copy full SHA for 3259e58
src/saml2/pack.py
@@ -166,9 +166,10 @@ def make_soap_enveloped_saml_thingy(thingy, header_parts=None):
166
167
if isinstance(thingy, six.string_types):
168
# remove the first XML version/encoding line
169
- logger.debug("thingy0: %s" % thingy)
170
- _part = thingy.split("\n")
171
- thingy = "".join(_part[1:])
+ if thingy[0:5].lower() == '<?xml':
+ logger.debug("thingy0: %s" % thingy)
+ _part = thingy.split("\n")
172
+ thingy = "".join(_part[1:])
173
thingy = thingy.replace(PREFIX, "")
174
logger.debug("thingy: %s" % thingy)
175
_child = ElementTree.Element('')
0 commit comments