Setting the User-Agent

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Setting the User-Agent

Mike Kerner via use-livecode
is

libURLSetCustomHTTPHeaders

broken? or am I doing it wrong?

on fetchPage
libURLSetCustomHTTPHeaders "User-Agent: SivaSivaApp"
put url ("https://www.himalayanacademy.com/ping.txt") into fld "webPage"
end fetchPage

if we tail  -n1500 /home/myDomain/logs/access_log

we see this:

24.43.231.222 - - [12/Sep/2017:13:07:56 -0700] "GET /ping.txt HTTP/1.1" 200 430 "-" "LiveCode (MacOS)"

Have yet to test on mobileā€¦but without setting anything I'm seeing this in the logs when the app accesses files

 "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60"

which is interesting but we would like to see some reference to the app in the access_logs

both from desktop and from mobile

any clues for the right way to do this? I can of course set it in the app, but if it's not working (8.1.7 RC1) on desktop, I doubt it will do better on mobile?

BR

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