Commit 80bf4c9a by Johannes Edmeier

Fix content-type parsing in SimleHostRoutingFilter

Posting via zuul doesnt work in case the Content-Type has a charset specified. Applied fix from spring-cloud/spring-cloud-netflix#1663 fixes #403
parent 27d23971
...@@ -282,7 +282,7 @@ public class SimpleHostRoutingFilter extends ZuulFilter { ...@@ -282,7 +282,7 @@ public class SimpleHostRoutingFilter extends ZuulFilter {
int contentLength = request.getContentLength(); int contentLength = request.getContentLength();
InputStreamEntity entity = new InputStreamEntity(requestEntity, contentLength, InputStreamEntity entity = new InputStreamEntity(requestEntity, contentLength,
request.getContentType() != null request.getContentType() != null
? ContentType.create(request.getContentType()) : null); ? ContentType.parse(request.getContentType()) : null);
switch (verb.toUpperCase()) { switch (verb.toUpperCase()) {
case "POST": case "POST":
HttpPost httpPost = new HttpPost(uri + this.helper.getQueryString(params)); HttpPost httpPost = new HttpPost(uri + this.helper.getQueryString(params));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment