I want to intercept all HTTP requests in a WebViewClient and make my own requests. The problem I'm having is dealing with gzipped responses.
There are a couple different posts suggesting methods that will work (such as AndroidHttpClient.getUngzippedContent(entity) or GZIPInputStream(entity.getResponse()) for instance) but when I return WebResourceResponses for these, the page loads blank. I assume this is because the html is gzipped, and then that isn't handled properly so the rest of the page doesn't even get requested.
Does anyone have a 100% working method for simply intercepting every HTTP request and returning a WebResourceResponse? I'm currently able to do this for anything that is not gzipped, but for gzipped responses I'm returning null (which means the request is not intercepted and thus gets made twice) so that the page loads properly.
Any help or a step in the right direction would be greatly appreciated. I figure this is probably not that difficult but I am totally stumped.