On 8/21/19 11:24 AM, Ralph DiMola via use-livecode wrote:
Mark,

Wow... good catch indeed. Thanks! Gziped??? I guess this is checked and
dealt with browsers. Now I have to see how to recognize this when it
happens. In this case if the json decode fails then I will try decompressing
it. Should this be a change so tsNet does this for you? Or do you think it's
our responsibility?

Hard to say. It's returning a 401 status, and there's no requirement for the server to say any more than that, so the JSON error message is a lagniappe. From a security standpoint, I wouldn't add the error message at all, whether it's compressed or not. I don't know whether a valid response would be compressed, so it's hard to know what to expect. The online docs don't discuss this.

I wouldn't expect tsNet to address this other than a possible change to the Accept-Encoding request header... the browser is using

Accept-Encoding: gzip, deflate, br

Not having tsNet available here, I'll make the assumption that you can use libURLSetCustomHTTPHeaders to solve your problem.

--
 Mark Wieder
 ahsoftw...@gmail.com

_______________________________________________
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

Reply via email to