Fix #259: HTML response to EWS autodiscover triggers libxml2 assert (II)
commitc7153f832c24666a2039c5bfeedb2315c27333f9
authorStefan Becker <chemobejk@gmail.com>
Thu, 10 Jul 2014 18:16:35 +0000 (10 21:16 +0300)
committerStefan Becker <chemobejk@gmail.com>
Sat, 16 Aug 2014 11:11:11 +0000 (16 14:11 +0300)
tree15e30ed0e0b4cc4db6e076fd1965c7fbb3e9437a
parent717286c31d5581d9b2b1661978bb3b0d5b20d857
Fix #259: HTML response to EWS autodiscover triggers libxml2 assert (II)

It seems that some HTTP servers ignore the "Accept:" header. Added a
check that the "Content-Type:" header starts with "text/xml" before we
call the libxml2 parser.

NOTE: I couldn't reproduce the libxml2 assert on Fedora 20 from the
provided debug log. It simply complains about XML errors and returns
a parse error to the caller.

(cherry picked from commit 6061788181cc9b971aca289b37a2a37e508ce22f)
src/core/sipe-ews-autodiscover.c