Solved

posting to https using LoadVars causes SSL warning

Posted on 2008-10-17
4
717 Views
Last Modified: 2013-11-11
I'm having a strange issue with loadVars and https:

my_out_loadVars.sendAndLoad('https://www.somesite.com/page.php?var=1', my_in_loadVars);

When I open the URL above directly by typing it into the browser, everything works fine.  However when I try to execute the code above, I get the SSL certificate popup warning (for FF or IE) which causes the response to fail.

Why would running this code inside Flash cause the SSL warning when I can call the URL directly without the warning?

Thanks in advance
0
Comment
Question by:rmirabelle
  • 2
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
Dreammonkey earned 500 total points
ID: 22746603
I think your sending your var twice ... ?!

You're sending it embedded in the code, and you're (I presume) sending it along with the URL as well...

Maybe I'm wrong, I don't know much about https but if you haven't yet, try code below...

Regards,

d
In Flash do this :

var my_in_and_out_vars:LoadVars = new LoadVars();

my_in_and_out_vars.var = 1;

my_in_and_out_vars.sendAndLoad('https://www.somesite.com/page.php', my_in_and_out_vars, "POST" );
 

my_in_and_out_vars.onLoad = function():Void {

    if(my_in_and_out_vars.verify == success){

        trace("sucess")

    } else if (my_in_and_out_vars.verify == fail){

        trace("fail")

    } else {

        trace("no connection !")

    }

}

in php start with :

<?php

$var= $_POST['var'];
 

$whatever = (do whatever);
 

if($whatever) {

  echo "&verify=success&";

} else {

  echo "&verify=fail&";

}
 

?>

Open in new window

0
 
LVL 8

Expert Comment

by:Dreammonkey
ID: 22746639
And if you don't need to return anything (from php to flash) I think you might even forget about the loadvars and just use a getURL() ....?
getURL("https://www.somesite.com/page.php?var=1", "_blank");

Open in new window

0
 
LVL 1

Author Comment

by:rmirabelle
ID: 22749243
Sorry, I was a little less than clear about the details.  The sendAndLoad does require a response from the server.  The ?var=1 is sent to the server to tell it to expect a POST of the variables from the root timeline of the swf.  All of this works OK.  And we do need a response back from the server, so getURL won't work.

We've determined that the problem is actually with our GoDaddy SSL cert.  We're uncertain now as to whether our cert properly supports "older" browser versions (e.g. IE6 and FF2) or whether we have a configuration error on our server.  Running this test works perfectly in IE7 and FF3 and breaks only in older versions.  How frustrating!  

What happens in the older browsers is that a popup SSL warning box (the kind you get that says the identity of the site cannot be verified) interferes with the server's response to our swf.  As such the swf, which is expecting a reply, never gets the reply.

My question above: 'Why would running this code inside Flash cause the SSL warning when I can call the URL directly without the warning?' was due to the fact that when I was testing from Flash, I was using FF2, while when I typed the URL directly, I was using FF3.

We're investigating GoDaddy's SSL support for older browsers.  It seems to be a real issue.  If I uncover  a genuine lack of browser support with GoDaddy SSL, I will post it here.

Thanks for the help.
0
 
LVL 1

Author Closing Comment

by:rmirabelle
ID: 31507223
You get the points cause you responded!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SWF won't scale? 4 520
Link puzzle piece images together and change color on hover 2 428
AWAY 3d Using BitMapCubeTexture 1 402
Missing Plugin for Firefox - Can't View Content 7 164
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now