Browse Source

fix 'RibbonRequest' cannot to encode issues

pull/6/head
Coramo 8 years ago
parent
commit
97c8f4c026
  1. 4
      spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/ribbon/FeignLoadBalancer.java

4
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/ribbon/FeignLoadBalancer.java

@ -123,9 +123,7 @@ public class FeignLoadBalancer extends
request.headers()); request.headers());
// Apache client barfs if you set the content length // Apache client barfs if you set the content length
headers.remove(Util.CONTENT_LENGTH); headers.remove(Util.CONTENT_LENGTH);
return new RequestTemplate().method(request.method()) return Request.create(request.method(),getUri().toASCIIString(),headers,request.body(),request.charset());
.append(getUri().toASCIIString())
.body(request.body(), request.charset()).headers(headers).request();
} }
Request toRequest() { Request toRequest() {

Loading…
Cancel
Save