Skip to content

Commit

Permalink
修复WebRequest的一个代码错误。
Browse files Browse the repository at this point in the history
  • Loading branch information
GalaxyCenter committed Mar 4, 2015
1 parent 472e574 commit 849a2b2
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions apollo.core/src/apollo/net/WebRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 11,6 @@
import java.util.Map;
import java.util.zip.GZIPInputStream;

import android.text.TextUtils;
import apollo.util.Encoding;
import apollo.util.FileUtil;

Expand Down Expand Up @@ -277,17 276,15 @@ private WebResponse createResponse(String url_str, HttpURLConnection conn) throw
}
}

if (TextUtils.isEmpty(resp.contentCharset))
if ("".equals(resp.contentCharset))
resp.contentCharset = this.responseCharset;
if ("gzip".equals(resp.contentEncoding)) {
in = new GZIPInputStream(conn.getInputStream());
} else {

if ("gzip".equals(resp.contentEncoding))
in = new GZIPInputStream(conn.getInputStream());
else
in = conn.getInputStream();
}

try {
in = conn.getInputStream();
baos = new ByteArrayOutputStream();
bytes = new byte[4096];
int len = 0;
Expand Down

0 comments on commit 849a2b2

Please sign in to comment.