管道基础大数据平台系统开发-【后端】-Server
13693261870
2024-03-25 b6b0cb226fcf184525ee7b36af3a09471e9c0057
src/main/java/com/lf/server/helper/HttpHelper.java
@@ -101,6 +101,7 @@
        String method = request.getMethod();
        HttpEntityEnclosingRequest proxyRequest = new BasicHttpEntityEnclosingRequest(method, url);
        proxyRequest.setEntity(new InputStreamEntity(request.getInputStream(), getContentLength(request)));
        //String str = EntityUtils.toString(proxyRequest.getEntity(), "UTF-8")
        return proxyRequest;
    }
@@ -269,6 +270,7 @@
    protected void copyResponseEntity(HttpResponse proxyResponse, HttpServletResponse response) throws IOException {
        HttpEntity entity = proxyResponse.getEntity();
        if (entity != null) {
            //String str = EntityUtils.toString(entity, "UTF-8")
            OutputStream servletOutputStream = response.getOutputStream();
            entity.writeTo(servletOutputStream);
        }