HTTP Cookie via ActionScript

155 views
Skip to first unread message

smalik

unread,
Oct 26, 2007, 12:11:41 PM10/26/07
to Flex India Community
I just upgraded my IDE to Flex Builder 3 Beta 2 and I am seeing this
rather discomforting error:

Error #2096: The HTTP request header Cookie cannot be set via
ActionScript.
ArgumentError: Error #2096: The HTTP request header Cookie cannot be
set via ActionScript.
at flash.net::URLStream/load()
at flash.net::URLLoader/load()

I am using a URLLoader to request some data and I am setting HTTP
Session Cookie in the header. This used to work fine for Flex 2 and
Flex 3 Beta 1 as well.

Has Adobe changed some implementation there now or is it "in transit"
issue for beta 2 and may eventually go away. Any one has any news?
Abdul? Mrinal? Anyone?

Regards,
Sandeep

mrinal wadhwa

unread,
Oct 26, 2007, 2:54:24 PM10/26/07
to flex_...@googlegroups.com
Sorry dude, I have no clue :D
I glanced through the release notes and they don't have anything about this.

URLLoader and URLStream are both in flash.net package so this could have something to do with flash player versions ... just guessing

_
Mrinal

Abdul Qabiz

unread,
Oct 26, 2007, 4:28:50 PM10/26/07
to flex_...@googlegroups.com
use as3httpclient :)

BTW! I need to check, if it compiles and works well with new beta...

-abdul

On 10/26/07, smalik < sandee...@gmail.com> wrote:
-abdul
---------------------------------------
http://abdulqabiz.com/blog/
---------------------------------------

smalik

unread,
Oct 27, 2007, 5:50:45 AM10/27/07
to Flex India Community
Yup,

I guess the issue was with Flash Player. I installed another version
and its working now. The issue is resolved for the time being, but I
am not sure if they are planning to do some thing like this with new
version of player. Lets see...

Thanks guys,
Sandeep

On Oct 27, 1:28 am, "Abdul Qabiz" <abdul.qa...@gmail.com> wrote:
> use as3httpclient :)
>
> BTW! I need to check, if it compiles and works well with new beta...
>
> -abdul
>

> On 10/26/07, smalik <sandeep.ma...@gmail.com> wrote:
>
>
>
>
>
> > I just upgraded my IDE to Flex Builder 3 Beta 2 and I am seeing this
> > rather discomforting error:
>
> > Error #2096: The HTTP request header Cookie cannot be set via
> > ActionScript.
> > ArgumentError: Error #2096: The HTTP request header Cookie cannot be
> > set via ActionScript.
> > at flash.net::URLStream/load()
> > at flash.net::URLLoader/load()
>
> > I am using a URLLoader to request some data and I am setting HTTP
> > Session Cookie in the header. This used to work fine for Flex 2 and
> > Flex 3 Beta 1 as well.
>
> > Has Adobe changed some implementation there now or is it "in transit"
> > issue for beta 2 and may eventually go away. Any one has any news?
> > Abdul? Mrinal? Anyone?
>
> > Regards,
> > Sandeep
>

> --
> -abdul
> ---------------------------------------http://abdulqabiz.com/blog/
> ---------------------------------------

Abdul Qabiz

unread,
Oct 27, 2007, 6:05:45 AM10/27/07
to flex_...@googlegroups.com
You found this issue in newer version of player? The beta one?

--
Sent from Gmail for mobile | mobile.google.com

smalik

unread,
Oct 27, 2007, 12:09:40 PM10/27/07
to Flex India Community
Yeah the version of player which comes with Flex 3 Beta 2. After that
I reinstalled Flex Builder 2 again (which I had removed in favor of
Flex 3 Builder Beta 2), re built the app and ran it again. This time
it worked. The unsettling thing is both times when I ran the app (one
with Flex 3 B2 and the second with Flex 2) and clicked "About Adobe
Flash Player", it took me to the web page where it said I had 9.0.0.28
version installed. Both times! So, I don't know what crap is going on,
though the issue is 100% reproducible every time I run my app built
with Flex 3 B2.

On Oct 27, 3:05 pm, "Abdul Qabiz" <abdul.qa...@gmail.com> wrote:
> You found this issue in newer version of player? The beta one?
>

Abdul Qabiz

unread,
Oct 27, 2007, 12:21:28 PM10/27/07
to flex_...@googlegroups.com
You can keep flexbuilder3, just install player from adobe site, it
would install release version not beta. I am gonna check this and file
bug or let them know.

-abdul

On 10/27/07, smalik <sandee...@gmail.com> wrote:
>

mrinal wadhwa

unread,
Oct 27, 2007, 12:31:01 PM10/27/07
to flex_...@googlegroups.com
The latest gold version is 9,0,47,0
I have Flex Builder 3 and I have 9,0,60,235
Latest moviestar version on labs is 9.0.64.0

You should probably confirm which version are you seeing the problem on.

_
Mrinal
http://weblog.mrinalwadhwa.com

rjo...@gmail.com

unread,
Dec 5, 2007, 12:15:19 PM12/5/07
to Flex India Community
They released a production version of moviestar yesterday on Adobe's
site, and this bug is still there!!! What can we do? Is it really a
"bug", or is it a new built in "security feature"? My apps are going
to break when people update to this new version!!

On Oct 27, 9:21 am, "Abdul Qabiz" <abdul.qa...@gmail.com> wrote:
> You can keep flexbuilder3, just install player from adobe site, it
> would install release version not beta. I am gonna check this and file
> bug or let them know.
>
> -abdul
>

Abdul Qabiz

unread,
Dec 6, 2007, 12:54:59 AM12/6/07
to flex_...@googlegroups.com
That's not a bug rather a security feature... Previous versions of player allowed it because of a bug...

Flash player is not supposed to set Cookie, cookies are sent whenever you make a http-request (via Flash Player API)... You can rather, set the cookie using ExternalInterface + JavaScript and it would be sent automatically on request...

-abdul

> > > > > --------------------------------------- http://abdulqabiz.com/blog/

> > > > > ---------------------------------------
>
> > > --
> > > Sent from Gmail for mobile | mobile.google.com
>
> > > -abdul
> > > ---------------------------------------http://abdulqabiz.com/blog/
> > > ---------------------------------------
>
> --
> Sent from Gmail for mobile | mobile.google.com
>
> -abdul
> --------------------------------------- http://abdulqabiz.com/blog/
> ---------------------------------------






--

Rick Nuthman

unread,
Nov 23, 2012, 11:45:16 PM11/23/12
to flex_...@googlegroups.com
Hello,

could you explain how this is accomplished in javascript? Where does setting the cookie take place in the workflow?
Reply all
Reply to author
Forward
0 new messages