Bukimedia / PrestaSharp

CSharp .Net client library for the PrestaShop API via web service
GNU General Public License v3.0
154 stars 152 forks source link

Error XDocument.Parse #334

Open OscarLate opened 5 years ago

OscarLate commented 5 years ago

Hi,

I have a lot of Webs with this dll and one of them in version 1.6.1.17 have one problem with the XML request (Others with same version works fine). All Request have BOM UTF8 characters () and can't parse the XDocument.

I did this. PrestaSharpDeserializer.cs

              string MarkUtf8 = Encoding.UTF8.GetString(Encoding.UTF8.GetPreamble());
            if (response.Content.StartsWith(MarkUtf8))
                response.Content = response.Content.Remove(0, MarkUtf8.Length);

Is not the best but works. but in my opinion the problem is in Prestashop or Apache/php config. Someone know something?