We're also working around this by Base64-encoding, but this is clearly
less than ideal. It definitely seems like a Flash Player bug. We ran
into this when doing AlivePDF REMOTE saves (i.e., bouncing the file off
the server). Do you know when you ran into this, Troy? I tested our
particular problem on Windows and on OS X last week, and neither had the
issue. 

-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso.com

-----Original Message-----
From: Troy Gilbert <[EMAIL PROTECTED]>
Reply-To: flexcoders@yahoogroups.com
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] URLRequest, ByteArray, and the 0 byte
Date: Mon, 29 Sep 2008 16:07:45 -0500

> The byte array seems to be truncated to the location of that byte. In
> general, any ByteArray sent as a data property payload of a URLRequest
> seems to be truncated to the location of the first zero byte. I've
> confirmed this by checking the Content-Length header of the POST
request
> (in fact, if the *first* byte is zero, the request seems to be turned
> into a GET--which is even weirder).

Just ran into a similar issue under OSX/Windows. If I tried to stick a
ByteArray into a URLVariables, no matter what combination of
operations I'd make, somewhere along the line it got converted to a
String and thus truncated at the first zero byte (because I assume
Flash uses null-terminated strings internally).

To fix it, I ended up encoding the data in Base64 before sticking it
into the URLVariables, which I think was actually a win over the
URL-encoding (e.g. %03%38%99...) anyway.

In regards to your POST/GET issue, Flash Player appears to convert
empty POSTs to GETs, which would explain why 0 has the first byte
(thus a zero-length data) would turn your POST into a GET.

Troy.



 


Reply via email to