add: support for gzip encoded http response
This commit is contained in:
parent
a5bc33db70
commit
df3af8fab1
1 changed files with 5 additions and 1 deletions
|
@ -62,7 +62,11 @@ helma.Http = function() {
|
||||||
var input;
|
var input;
|
||||||
try {
|
try {
|
||||||
if (method !== 'DELETE') {
|
if (method !== 'DELETE') {
|
||||||
input = new java.io.BufferedInputStream(connection.getInputStream());
|
var stream = connection.getInputStream();
|
||||||
|
if (connection.getContentEncoding() === 'gzip') {
|
||||||
|
stream = new java.util.zip.GZIPInputStream(stream);
|
||||||
|
}
|
||||||
|
input = new java.io.BufferedInputStream(stream);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
input = new java.io.BufferedInputStream(connection.getErrorStream());
|
input = new java.io.BufferedInputStream(connection.getErrorStream());
|
||||||
|
|
Loading…
Add table
Reference in a new issue