Problem with Indy IdHttp Post in Delphi 2010

一世执手 提交于 2019-12-03 16:01:56

see if making sXML ansistring makes a difference.

Maybe the string is streamed in UTF-16 or so.

The contentLength is in octets and your string length is in Chars. Since sizeof( Char ) = 2 in Delphi 2009+ this is a mismatch!

Perhaps it is better to convert your XML to/from an UTF8 string. Some aplications will not support the USC2 Unicode format.

You should supply the size of the resulting stream as the ContentLength.

Better yet: don't supply the ContentLength and let Indy do it for you..

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!