管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-11-14 616db59ed7fce7f0b4332c6d61e4fb3f173390f3
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);
        }