Closed kylannjohnson closed 5 years ago
Hi Kylan,
thanks for bringing this to our attention and the detailed analysis. I will investigate this issue today and keep you updated.
Hi Kylan,
I just wanted to let you know that the fix is already pushed to GitHub (see also https://github.com/Dynatrace/openkit-java/commit/9d018be5d5194674db40465c73d15891f17ef493) Your suggested solution
connection.setRequestProperty("Content-Length", String.valueOf(gzippedData.length));
was correct. Additionally, a test has been added to verify the HTTP header values.
A new package will be published to Bintray tomorrow and appropriate releases on GitHub will also be created.
Awesome. I'll pull it down when ready and let you know how it goes!
Hi Kylan,
I wanted to inform you that the package is now available on Bintray (https://bintray.com/dynatrace/openkit/com.dynatrace.openkit/1.4.2). I've been testing it with an app on Android 8.0 and there were no logs/exceptions.
I will leave this issue open until you confirmed it works for you as well.
Looks like everything is good with 1.4.2. Thanks for the quick turn around!
You are welcome! Thanks for your confirmation.
I seems like the HTTPClient implementation will not work on Android.
I get this INFO trace when trying to use the sample code in the "instrumenting your app" section of the docs
In HTTPClient, the Content Length used is data.length
Since this class uses
java.util.zip.GZIPOutputStream
, it would seem the version given in the Android framework isn't compatible.Should it be changed to use the gzipped length?
e.g.