This commit is contained in:
@@ -1696,6 +1696,7 @@ public final class Utility {
|
|||||||
conn.setDoOutput(true);
|
conn.setDoOutput(true);
|
||||||
conn.getOutputStream().write(body.getBytes(UTF_8));
|
conn.getOutputStream().write(body.getBytes(UTF_8));
|
||||||
}
|
}
|
||||||
|
conn.setUseCaches(false);
|
||||||
conn.connect();
|
conn.connect();
|
||||||
int rs = conn.getResponseCode();
|
int rs = conn.getResponseCode();
|
||||||
if (rs == 301 || rs == 302) {
|
if (rs == 301 || rs == 302) {
|
||||||
@@ -1712,6 +1713,7 @@ public final class Utility {
|
|||||||
while ((pos = in.read(bytes)) != -1) {
|
while ((pos = in.read(bytes)) != -1) {
|
||||||
out.write(bytes, 0, pos);
|
out.write(bytes, 0, pos);
|
||||||
}
|
}
|
||||||
|
in.close();
|
||||||
return out;
|
return out;
|
||||||
} finally {
|
} finally {
|
||||||
if (opening) conn.disconnect();
|
if (opening) conn.disconnect();
|
||||||
|
|||||||
Reference in New Issue
Block a user