I am trying to gzip responses from the GAE server, but getting null in Content-Encoding.
I have the following code:
connection = (HttpURLConnection)url.openConnection(); connection.setRequestMethod("POST"); connection.setRequestProperty("Content-Type", "application/json; charset=utf-8"); //"application/json; charset=utf-8" connection.setRequestProperty("Accept-Encoding", "gzip"); connection.setRequestProperty("User-Agent", "gzip"); connection.setUseCaches (false); connection.setDoInput(true); connection.setDoOutput(true); //write //read System.out.println("Content-Encoding " + connection.getContentEncoding());
I read that on GAE servers automatic compression. So what could be the problem?
source share