From d5f2bae47c0781ba7c1f6a0bb201e1b8a931be51 Mon Sep 17 00:00:00 2001 From: Redkale <22250530@qq.com> Date: Thu, 31 May 2018 15:15:08 +0800 Subject: [PATCH] --- src/org/redkale/util/Utility.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/org/redkale/util/Utility.java b/src/org/redkale/util/Utility.java index c831eb8fd..c9d2c8c8b 100644 --- a/src/org/redkale/util/Utility.java +++ b/src/org/redkale/util/Utility.java @@ -1696,6 +1696,7 @@ public final class Utility { conn.setDoOutput(true); conn.getOutputStream().write(body.getBytes(UTF_8)); } + conn.setUseCaches(false); conn.connect(); int rs = conn.getResponseCode(); if (rs == 301 || rs == 302) { @@ -1712,6 +1713,7 @@ public final class Utility { while ((pos = in.read(bytes)) != -1) { out.write(bytes, 0, pos); } + in.close(); return out; } finally { if (opening) conn.disconnect();