summaryrefslogtreecommitdiff
path: root/src/se/leap/bitmaskclient/ProviderAPI.java
diff options
context:
space:
mode:
authorcyBerta <richy@cyborgsociety.org>2014-03-18 12:26:30 +0100
committercyBerta <richy@cyborgsociety.org>2014-03-18 12:26:30 +0100
commit61732f14fd44f51392c673bfb2b08a6b226a9945 (patch)
treea5853412a41d63061acbedea569e2943636f0191 /src/se/leap/bitmaskclient/ProviderAPI.java
parentbb503590fc648e6b97f0f2b95156d4179cc33a11 (diff)
parent2601c824c0a8429326f3fb64533c6ecc56438a7c (diff)
Merge remote-tracking branch 'parmegv/bug/app-crashes-if-there-is-no-anonymous-certificate-#5310' into develop
Diffstat (limited to 'src/se/leap/bitmaskclient/ProviderAPI.java')
-rw-r--r--src/se/leap/bitmaskclient/ProviderAPI.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/se/leap/bitmaskclient/ProviderAPI.java b/src/se/leap/bitmaskclient/ProviderAPI.java
index 62d86455..7aafa2e3 100644
--- a/src/se/leap/bitmaskclient/ProviderAPI.java
+++ b/src/se/leap/bitmaskclient/ProviderAPI.java
@@ -601,7 +601,7 @@ public class ProviderAPI extends IntentService {
URLConnection url_connection = provider_url.openConnection();
url_connection.setConnectTimeout(seconds_of_timeout*1000);
if(!LeapSRPSession.getToken().isEmpty())
- url_connection.addRequestProperty(LeapSRPSession.TOKEN, LeapSRPSession.getToken());
+ url_connection.addRequestProperty(LeapSRPSession.AUTHORIZATION_HEADER, "Token token = " + LeapSRPSession.getToken());
json_file_content = new Scanner(url_connection.getInputStream()).useDelimiter("\\A").next();
} catch (MalformedURLException e) {
json_file_content = formatErrorMessage(R.string.malformed_url);
@@ -638,7 +638,7 @@ public class ProviderAPI extends IntentService {
(HttpsURLConnection)url.openConnection();
urlConnection.setSSLSocketFactory(getProviderSSLSocketFactory());
if(!LeapSRPSession.getToken().isEmpty())
- urlConnection.addRequestProperty(LeapSRPSession.TOKEN, LeapSRPSession.getToken());
+ urlConnection.addRequestProperty(LeapSRPSession.AUTHORIZATION_HEADER, "Token token=" + LeapSRPSession.getToken());
json_file_content = new Scanner(urlConnection.getInputStream()).useDelimiter("\\A").next();
} catch (CertificateException e) {
// TODO Auto-generated catch block