This Web URL Stopped Working in LiveCode all versions. HELP!
Mark Wieder
ahsoftware at sonic.net
Wed Aug 21 14:52:20 EDT 2019
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
ahsoftware at gmail.com
More information about the use-livecode
mailing list