Explorar el Código

链接不重复使用

callm hace 1 año
padre
commit
7122124b04
Se han modificado 1 ficheros con 2 adiciones y 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);
     }