Skip to content

Commit

Permalink
Correction of extra setRequestProperty
Browse files Browse the repository at this point in the history
  • Loading branch information
willrust committed May 7, 2014
1 parent 09f742c commit 5fbf6ea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion KISSmetricsAPI/src/com/kissmetrics/sdk/ConnectionImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;

import android.os.Build;
Expand Down Expand Up @@ -79,14 +80,16 @@ public void sendRecord(final String urlString, final ConnectionDelegate delegate
// TODO: Apply any easily obtainable device/OS info to the user agent value

// addressing java.io.EOFException
connection.setRequestProperty("Connection", "close");
if (Build.VERSION.SDK != null && Build.VERSION.SDK_INT > 13) {
connection.setRequestProperty("Connection", "close");
}

responseCode = connection.getResponseCode();
connection.connect();

} catch (MalformedURLException e) {
Log.w("KISSmetricsAPI", "Connection URL was malformed: " + e);
malformed = true;
} catch (Exception e) {
Log.w("KISSmetricsAPI", "Connection experienced an Exception: " + e);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ public void verifyTracking(String productKey, String installUuid, VerificationDe
connection.setRequestProperty("User-Agent", "KISSmetrics-Android/2.0");

// addressing java.io.EOFException
connection.setRequestProperty("Connection", "close");
if (Build.VERSION.SDK != null && Build.VERSION.SDK_INT > 13) {
connection.setRequestProperty("Connection", "close");
}
Expand Down
Binary file modified KISSmetricsSDK.jar
Binary file not shown.

0 comments on commit 5fbf6ea

Please sign in to comment.