Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Replaced 'utf8' in ET.tostring with 'utf-8', invalid XML (400) otherwise #538
The XML that is generated by the Azure driver contains
I thought that as well. But apparently, when using
produces the following output:
So it only seems to make a difference when
This actually seems as it may be a bug in lxml. The documentation states this:
And the code is this:
I'm not familiar enough with lxml to see what goes wrong, but it should not write a XML declaration for
I will open a bug report on the lxml tracker, just in case.
Update: here is the report https://bugs.launchpad.net/lxml/+bug/1470809
@jeverling Thanks, I've merged changes into trunk.
On a related note - when I was originally working and testing the changes, it mostly worked, but occasionally got 400 status code back. I was digging into it, but I never could consistently reproduce the issue or find the root cause (I thought there was something weird going on, on the Azure side).
I wonder if there there is something "weird" going on, on the Azure side - e.g. some servers accept XML with non-standard encoding declaration and others don't. Although, I think it would be unlikely they have different versions / libraries running on different servers...