I want to test whether or not a particular HTTP server works and whether or not it has the correct software in the server by seeing if it’s giving back happy HTTP responses, or any kind of responses that I can try to parse to see if they are in
some kind of recognisable format. I need to make sure that doing this
won’t hang the querier though if the server doesn’t exist, isn’t an http server, or is the wrong http server. How should I go about achieving this with no hang-danger?
And yes I’m using iOS Shortcuts again, and you don’t know anything about it, but there’s not much to say really: it just has the usual synchronous get-content-at-url( url ) service, or whatever it’s called.
Now the specifics: This is a ZyXEL modem that is running our friend Mr Johnson’s
custom ZyXEL modem firmware and I’m talking to the
Johnson stats server, an alternative small http server ‘Mongoose’, listening on port 8000, running alongside the usual ZyXEL main admin webserver. (Easy-stats web server only works if the ZyXEL is configured into modem-only mode, ie it’s not being a wireless
router.) So this is
http://192.168.1.1:8000I’m also wondering about the choice of url to query, to see if an intelligent choice might help but I’m not at all hopeful.
I don’t have a way of pinging the address first programmatically in Shortcuts afaik, will recheck that. But I’m not sure it would really help to prevent hangs though.