I've run into a problem reusing HttpUrlConnection

I am using URL.openConnection.getInputStream to get an input stream
and then creating a new GZIPInputStream from this input stream.

This works great for the first HTTP request/response; however, on the
second HTTP response, it appears that the HttpUrlConnection is
returning a corrupt input stream.

My guess is that when I close the first GZIPInputStream, it leaves
some data in the pipe or otherwise corrupts the HttpUrlConnection;
when I subsequently make a request from the same server in the second
request, the new GZIPInputStream can't decode the data.

Any ideas or suggestions? Is anyone else seeing this?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to