wispr: If redirected and TLS is not supported we fallback on browser request
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Tue, 22 May 2012 10:17:38 +0000 (13:17 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 22 May 2012 19:08:22 +0000 (21:08 +0200)
src/wispr.c

index d43763d..e5796d7 100644 (file)
@@ -692,8 +692,9 @@ static gboolean wispr_portal_web_result(GWebResult *result, gpointer user_data)
 
                break;
        case 302:
-               if (g_web_result_get_header(result, "Location",
-                                               &redirect) == FALSE) {
+               if (g_web_supports_tls() == FALSE ||
+                               g_web_result_get_header(result, "Location",
+                                                       &redirect) == FALSE) {
                        __connman_agent_request_browser(wp_context->service,
                                        wispr_portal_browser_reply_cb,
                                        wp_context->status_url, wp_context);