Skip to content

Commit

Permalink
Fixing Zuul-Simple-Webapp to route POST request to RouteHost
Browse files Browse the repository at this point in the history
  • Loading branch information
VijithaEkanayake committed Feb 15, 2016
1 parent 2622719 commit 1a24fc6
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ class SimpleHostRoutingFilter extends ZuulFilter {
}, 30000, 5000)
}

public SimpleHostRoutingFilter() {}
public SimpleHostRoutingFilter() {
super();
}

private static final HttpClientConnectionManager newConnectionManager() {
SSLContext sslContext = SSLContexts.createSystemDefault();
Expand Down Expand Up @@ -161,7 +163,7 @@ class SimpleHostRoutingFilter extends ZuulFilter {
HttpServletRequest request = RequestContext.getCurrentContext().getRequest();
Header[] headers = buildZuulRequestHeaders(request)
String verb = getVerb(request);
InputStream requestEntity = getRequestBody(request)
InputStream requestEntity = request.getInputStream();
CloseableHttpClient httpclient = CLIENT.get()

String uri = request.getRequestURI()
Expand Down Expand Up @@ -222,7 +224,7 @@ class SimpleHostRoutingFilter extends ZuulFilter {
switch (verb) {
case 'POST':
httpRequest = new HttpPost(uri + getQueryString())
InputStreamEntity entity = new InputStreamEntity(requestEntity, request.getContentLength())
InputStreamEntity entity = new InputStreamEntity(requestEntity)
httpRequest.setEntity(entity)
break
case 'PUT':
Expand Down

0 comments on commit 1a24fc6

Please sign in to comment.