Could someone explain this por favor ?

Ralph DiMola rdimola at evergreeninfo.net
Fri Aug 7 11:29:06 EDT 2015


I only urlencode data going to the server from the client. I don't urldecode
in the server script. I did urldecode the $_GET array when I first used the
LC server. I found later that I didn't need to do this. This seems to be
done already when the url argument data is put into the $_GET array. I
return(in the server script) "return arrayencode(MyArrayWithReturnedData).
Then in the client I do:

Try 
put arraydecode(ReturnedData) into ReturnedData
end try

if ReturnedData is an array then
-- process the data in the array
Else
-- Error processing here
End if

To date I have not had any problems with the $_GET array or the returned
data. One of my parameters is an email address and the "@" is already
urldecoded in the $_GET array. Based on this thread I now question if I am
just lucky by not urldecoding the $_GET array?

Ralph DiMola
IT Director
Evergreen Information Services
rdimola at evergreeninfo.net

-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf
Of jbv at souslelogo.com
Sent: Friday, August 07, 2015 10:48 AM
To: How to use LiveCode
Subject: Re: Could someone explain this por favor ?

Mike,

>
> You might ONLY urlencode, then return the data from the server 
> straight (before decode) and a second copy after decode, and see if 
> what you put in ends up as what you get out.  (obviously, the data 
> doesn't need to be decoded on the apache side, because it works.. But 
> it'd be interesting to see what happens)
>

I just tried, and I get EXACTLY the same base64 string on the server before
and after urldecode...
Needless to say I'm puzzled...

jbv


_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list