2011/2/10 David DURIEUX <[email protected]>
> Hello,
>
>
Linvinus pointed out some issue with the code.
> For example, I have try with RU inventory but not works with these two
> codes :
>
> if
> (strstr(gzuncompress($GLOBALS["HTTP_RAW_POST_DATA"]),'encoding="ISO-8859-1"'))
> {
$data = gzuncompress($GLOBALS["HTTP_RAW_POST_DATA"]);
>
You call gzuncompress two time in a row here. It's useless. For your
information, since OCS 1.02, the agent can also push uncompressed XML.
$from_charset=mb_detect_encoding($data, "auto");
>
This will never work as expected :( The server administrator has to set
$from_charset by hisself.
> $data = mb_convert_encoding($data,"UTF-8",$from_charset);
> $GLOBALS["HTTP_RAW_POST_DATA"] = gzcompress($data);
>
This is not a good idea. You should never change the GLOBALS var content.
Cheers
--
Gonéri Le Bouder
_______________________________________________
Fusioninventory-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/fusioninventory-devel