NVM, urlencode does indeed change the base64 encoded data, but still doesn't seem to be much point. Having said that, Mark is right. (Marks usually are)
Since its the decompress that throws the error, (as I've just seen on my own test) it is looking like what goes in using urlencode, and what comes out, are not the same. Since, as Mark said, apache decodes when the data comes in, then its likely that the second urldecode (done by you, after the server has done it once) munges things to the point where decompress can't work. On Fri, Aug 7, 2015 at 5:41 AM, Mike Bonner <bonnm...@gmail.com> wrote: > If I understand correctly, the base64 encode will turn the data into > something like this: > > TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlz > IHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2Yg > dGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGlu > dWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleGNlZWRzIHRo > ZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4= > > At which point UrlEncode() would serve no purpose. > > Having said that.. I'm not sure why urldecode is throwing an error. Even > if you pass it a straight unencoded text string, it should just.. do > nothing to it. (If there are no % signs, theres nothing to decode.. It > might hork something if there ARE % signs, but it shouldn't cause a crash) > Either way though, I think it should be Either/Or. Either url encode, OR > base64 encode. > > On Fri, Aug 7, 2015 at 4:13 AM, Mark Schonewille < > m.schonewi...@economy-x-talk.com> wrote: > >> Hi JBV, >> >> The Apache server decodes the URL before passing it on to the LiveCode >> engine. The same happens with PHP. >> >> -- >> 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 11:52, j...@souslelogo.com wrote: >> >>> Hi list >>> >>> On the client side I have this script : >>> >>> get myVar >>> get compress(it) >>> get base64encode(it) >>> >>> POST ("a=" & urlencode(it)) to URL >>> ("http://www.domain.com/irev/myScript.lc?") >>> put base64decode(it) into myVar >>> put decompress(myV) into myVar >>> answer myVar >>> >>> and on the server side I have : >>> >>> put $_POST["a"] into myVar >>> put URLDecode(myVar) into myVar >>> put base64decode(myVar) into myVar >>> put decompress(myVar) into myVar >>> >>> >>> and this returns a compilation error on the server side. >>> But if I remove the line "put URLDecode(myVar) into myVar", then it >>> works... >>> >>> What am I missing ? >>> >>> Thanks in advance >>> jbv >>> >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode