| | |
| | | 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; |
| | | } |
| | |
| | | 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); |
| | | } |