Could someone explain this por favor ?

Mark Schonewille m.schonewille at economy-x-talk.com
Fri Aug 7 12:09:11 EDT 2015


Hi Ralph,

No, you're not lucky. This is how it is supposed to be. Data sent to the 
server should be urlEncoded if sent as a URL, but data received from the 
server don't need to be urlDecoded.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Installer Maker for LiveCode:
http://qery.us/468

Buy my new book "Programming LiveCode for the Real Beginner" 
http://qery.us/3fi

LiveCode on Facebook:
https://www.facebook.com/groups/runrev/

On 8/7/2015 17:29, Ralph DiMola wrote:
> 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
>
>
> _______________________________________________
> 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