06-30-2011 10:21 PM - edited 06-30-2011 10:25 PM
Hi. I'm wondering if the BrowserField2 (JRE 5/6) supports gzip compression. I have successfully set my headers to pass Accept-Encoding:gzip, and the server logs confirm this, but when the page is displayed in my app, it's just gibberish (crazy characters and whatnot). When I remove that header, the page displays fine, but it not compressed.
FYI - The same page loads just fine in the built-in Blackberry Browser.
Any ideas are much appreciated!! Thanks!
07-01-2011 03:32 AM
try like this......
07-01-2011 06:56 AM
Thanks for the reply. I actually tried that. Below is a snippet of code that I currently have in place. It's passing the header correctly, and the server is responding by sending the data compressed... it just seems the browserfield isn't decoding it correctly. It's just displaying a bunch of strange characters. Clearly, I am missing something???
HttpHeaders headers = new HttpHeaders();
07-01-2011 07:16 AM
have u tried setting user agent also....................
07-01-2011 07:29 AM
it is also possible that server was not properly sending compressed data so check this page in ur program
07-01-2011 07:40 AM
I had not tried that previously. Thank you for the suggestion.
I just tried it (code below), but unfortunately, I was met with the same crazy characters. I'm pretty sure the data is being sent properly because the built-in Blackberry Browser is working, and it's receiving the gzipped version of the site.
ApplicationDescriptor desc = ApplicationDescriptor.currentApplicationDescriptor();
if (desc != null)
String name = desc.getName();
String version = desc.getVersion();
//Default = BlackBerry Browser's User Agent
I'm at a loss. What I thought was so easy is not proving to be. I had zero issues with the Android or iPhone versions. Boo. (