Exosite HTTP API is responding to GET and POST with "302 Found"


#1

My device is receiving the following responses to GET and POST requests to the HTTP API:

GET /onep:v1/stack/alias?[alias]  HTTP/1.1
Host: [whitelabel].m2.exosite.com
User-Agent: [useragent]
Connection: close
X-Exosite-CIK: [valid CIK]
Accept: application/x-www-form-urlencoded; charset=utf-8

HTTP/1.1 200 OK
Connection: close
Pragma: no-cache
Cache-Control: no-cache
Content-Type: text/html

HTTP/1.0 302 Found
Location: /cgi-bin/home.ha
Pragma: no-cache
Content-Type: text/html

POST /onep:v1/stack/alias HTTP/1.1
Host: [whitelabel].m2.exosite.com
User-Agent: [useragent]
Connection: close
X-Exosite-CIK: [valid CIK]
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Content-Length: 10

HTTP/1.0 302 Found
Location: /onep:v1/stack/alias
Pragma: no-cache
Content-Type: text/html

<html><meta http-equiv=Refresh content=0;url=/onep:v1/stack/alias>
<body></body></html>

I have replaced several things in the above requests with placeholders wrapped in brackets. I only have the first ~200 characters of response from Exosite. The POST also omits the dataport aliases and values which are being sent to Exosite. These GET and POST requests worked previously, returning 200 and 204 respectively. What does the 302 status mean (other than “Found” or possibly redirect), and what should my device do in response to it?


#2

Has anything about your network configuration changed recently? Or have you moved to a completely different network?

It looks to me like you’re getting trapped behind a captive portal. The OneP never responds with a 302 as far as I know and it definitely doesn’t use CGI (Location: /cgi-bin/home.ha from your first response). That means these responses are coming from some other server, likely the network’s gateway.

You’ll need to talk to the IT department that manages this network and find out what options you have to get a normal internet connection for a device that doesn’t have a browser.


#3

Thanks for the reply, Patrick. This particular device is connected to the same Wi-Fi access point (built into an AT&T DSL modem) that it has been for the past few months. I haven’t seen this behavior out of it previously and it’s used by a small business with no IT department, so I doubt they would have made any changes that would introduce a captive portal. Would this be a question for AT&T, or could there be some other explanation?

Also, I have seen some example code on Exosite’s GitHub that at least has provision to parse a 302 status. I know that the HTTP API documentation doesn’t mention any 3xx status codes, but I thought I would bring it up just in case.


#4

Not totally sure where it would be coming from, but asking AT&T (assuming they are actually the ISP) might be a good place to start.

That example code was likely just from a generic HTTP example that our example was based on. Just to be sure I did a search of our logs and in the last two weeks the HTTP API has never returned a 302.


#5

Ok, I’ll get in touch with AT&T or whoever the provider is and ask them what’s going on. If I find anything of interest I will add it to this thread. Thanks again for your help.