cbitstech / Purple-Robot

Sensing and automation platform for Android.
Other
38 stars 19 forks source link

Cannot use an HTTPS URL in the "JSON Configuration URL" (may be due to HTTP 301 redirect) #194

Closed estory1 closed 10 years ago

estory1 commented 11 years ago

Current config:

1) My JSON Configuration URL is our usual mohrlab redirect-to-some-other-URL URL.

2) The target URL is:

https://app2.cbits.northwestern.edu/output_files/H2H/estory1@gmail.com.prCfg.json.txt?user_id=estory1@gmail.com

The HTTP protocol to that file results in PR indicating a successful update, whereas HTTPS does not.

audaciouscode commented 10 years ago

Please post the regular mohrlab URL that returns the 301 so I can investigate further.

estory1 commented 10 years ago

EX: http://mohrlab.northwestern.edu/robot/?user_id=estory1%40gmail.com

Please post the regular mohrlab URL that returns the 301 so I can investigate further.

— Reply to this email directly or view it on GitHubhttps://github.com/nupmmarkbegale/Purple-Robot-Manager/issues/194#issuecomment-27547923 .

audaciouscode commented 10 years ago

https://mohrlab.northwestern.edu/robot/?user_id=estory1%40gmail.com doesn't even work on my desktop Chrome install. The http version does. In this case, it looks like the server is misconfigured. CURL output:

Randolph-Carter:~ cjkarr$ curl -I https://mohrlab.northwestern.edu/robot/?user_id=estory1%40gmail.com curl: (35) Server aborted the SSL handshake

audaciouscode commented 10 years ago

Randolph-Carter:~ cjkarr$ curl -I http://mohrlab.northwestern.edu/robot/?user_id=estory1%40gmail.com HTTP/1.1 301 Moved Permanently Transfer-Encoding: chunked Content-Type: text/html;charset=UTF-8 Location: http://app2.cbits.northwestern.edu:81/output_files/MA/estory1@gmail.com.prCfg.json.txt?user_id=estory1@gmail.com Server: Microsoft-IIS/8.0 X-Powered-By: ASP.NET Access-Control-Allow-Origin: * Date: Fri, 01 Nov 2013 06:26:10 GMT

audaciouscode commented 10 years ago

The issue is now resolved. The main problem is that the app2 SSL certificate wasn't recognized as valid by Android, so the JSON configuration can now ignore the cert if the Liberal SSL setting is checked in the HTTP upload config. This is probably an issue related to NU's love of ghetto certificates.