From 9efec5cef7a6571e7aee38b669367468aeffb9b8 Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Fri, 2 Dec 2011 04:44:34 +0000 Subject: [PATCH] Bring binary serialized OSD in line with reference implementation by Linden Lab's python LLSD parsers: https://bitbucket.org/lindenlab/llbase/src/78beb7385d87/llbase/llsd.py Patch by: Dahlia Trimble git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3592 52acb1d6-8a22-11de-b505-999d5b087335 --- OpenMetaverse.StructuredData/LLSD/BinaryLLSD.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenMetaverse.StructuredData/LLSD/BinaryLLSD.cs b/OpenMetaverse.StructuredData/LLSD/BinaryLLSD.cs index a6f6882d..d50e97be 100644 --- a/OpenMetaverse.StructuredData/LLSD/BinaryLLSD.cs +++ b/OpenMetaverse.StructuredData/LLSD/BinaryLLSD.cs @@ -71,7 +71,7 @@ namespace OpenMetaverse.StructuredData private const byte mapEndBinaryMarker = (byte)'}'; private const byte keyBinaryMarker = (byte)'k'; - private static readonly byte[] llsdBinaryHeadBytes = Encoding.ASCII.GetBytes(llsdBinaryHead); + private static readonly byte[] llsdBinaryHeadBytes = Encoding.ASCII.GetBytes(llsdBinaryHead2); /// /// Deserializes binary LLSD @@ -157,6 +157,7 @@ namespace OpenMetaverse.StructuredData if (prependHeader) { stream.Write(llsdBinaryHeadBytes, 0, llsdBinaryHeadBytes.Length); + stream.WriteByte((byte)'\n'); } SerializeLLSDBinaryElement(stream, data); return stream;