Explorar o código

链接不重复使用

callm hai 1 ano
pai
achega
7122124b04
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/com/uas/mes/core/util/HttpUtil.java

+ 2 - 1
src/com/uas/mes/core/util/HttpUtil.java

@@ -539,7 +539,8 @@ public class HttpUtil {
         HttpPost post = new HttpPost(postUrl);
         StringEntity postingString = new StringEntity(formData, HTTP.UTF_8);
         post.setEntity(postingString);
-        post.setHeader("Content-type", "application/json");
+		post.setHeader("Content-type", "application/json");
+		post.setHeader("Connection", "close");
         CloseableHttpResponse response = httpClient.execute(post);
         return Response.getResponse(response);
     }