Please check the following and it will clear what i need to say..
 
The way in which the data is used depends on the type of object used:
        * If the object is a ByteArray object, the binary data of the ByteArray 
object is used as POST data. For GET, data of ByteArray type is not supported. 
Also, data of ByteArray type is not supported for FileReference.upload() and 
FileReference.download(). 
        * If the object is a URLVariables object and the method is POST, the 
variables are encoded using x-www-form-urlencoded format and the resulting 
string is used as POST data. An exception is a call to FileReference.upload(), 
in which the variables are sent as separate fields in a multipart/form-data 
post. 
        * If the object is a URLVariables object and the method is GET, the 
URLVariables object defines variables to be sent with the URLRequest object. 
        * Otherwise, the object is converted to a string, and the string is 
used as the POST or GET data. 
 Thanks,

with Regards,
Jitendra Jain




----- Original Message ----
From: Maciek Sakrejda <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Tuesday, 30 September, 2008 9:13:51 PM
Subject: Re: [flexcoders] URLRequest, ByteArray, and the 0 byte


That is not what the documentation says:

If the object is a ByteArray object, the binary data of the ByteArray
object is used as POST data. For GET, data of ByteArray type is not
supported. Also, data of ByteArray type is not supported for
FileReference. upload() and FileReference. download( ).

from
http://livedocs. adobe.com/ flex/3/langref/ flash/net/ URLRequest. html#data

I was doing a POST with a ByteArray as the data. Again, this works
correctly under Windows and OS X, so I'm pretty sure this is a Player
bug under Linux.
-- 
Maciek Sakrejda
Truviso, Inc.
http://www.truviso. com

-----Original Message-----
From: jitendra jain <jitendra_jain_ [EMAIL PROTECTED] com>
Reply-To: [EMAIL PROTECTED] ups.com
To: [EMAIL PROTECTED] ups.com
Subject: Re: [flexcoders] URLRequest, ByteArray, and the 0 byte
Date: Tue, 30 Sep 2008 09:13:59 +0530 (IST)

All the request data that is send is String. 

Thanks,

with Regards,
Jitendra Jain

----- Original Message ----
From: Troy Gilbert <troy.gilbert@ gmail.com>
To: [EMAIL PROTECTED] ups.com
Sent: Tuesday, 30 September, 2008 9:03:14 AM
Subject: Re: [flexcoders] URLRequest, ByteArray, and the 0 byte

> 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.

// this byte array probably needs to be bigger to actually end up
// with a zero-byte in the compressed data
var bytes:ByteArray = new ByteArray();
bytes.writeUTFBytes ("This is just some filler text.");
bytes.compress( );

// URLVariables automatically encodes its dynamic properties
// using a www-form-url- encode format, i.e. %12%34%56%78% 90
var variables:URLVariab les = new URLVariables( );
variables.username = "troy";
variables.action = "save";
variables.data = bytes;

// when the request is made, 'variables' is converted to a string
// the nulls in the ByteArray are not escaped, so they truncate the data
var request:URLRequest = new URLRequest("http://mywebserver/ myscript.
php");
request.method = URLRequestMethod. POST;
request.data = variables;

// Troy.

____________ _________ _________ _________ _________ _________ _
Add more friends to your messenger and enjoy! Invite them now.

 


      Be the first one to try the new Messenger 9 Beta! Go to 
http://in.messenger.yahoo.com/win/

Reply via email to