Commit a7abfd42 by Dave Syer

Upgrade to Zuul 1.1

Still a release candidate (not yet GA), but seems to work, so we'll try and update before Spring Cloud is released again. Fixes gh-546, fixes gh-567, fixes gh-553 (probably)
parent 5f84bcdd
......@@ -30,7 +30,8 @@
<feign.version>8.10.0</feign.version>
<hystrix.version>1.4.16</hystrix.version>
<ribbon.version>2.1.0</ribbon.version>
<zuul.version>1.0.28</zuul.version>
<servo.version>0.9.4</servo.version>
<zuul.version>1.1.0-rc.1</zuul.version>
<rxjava.version>1.0.11</rxjava.version>
<java.version>1.7</java.version>
<turbine.version>1.0.0</turbine.version>
......@@ -174,6 +175,11 @@
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.netflix.netflix-commons</groupId>
<artifactId>netflix-commons-util</artifactId>
<version>0.1.1</version>
</dependency>
<dependency>
<groupId>com.netflix.archaius</groupId>
<artifactId>archaius-core</artifactId>
<version>${archaius.version}</version>
......@@ -210,6 +216,11 @@
<version>1.19</version>
</dependency>
<dependency>
<groupId>com.netflix.servo</groupId>
<artifactId>servo-core</artifactId>
<version>${servo.version}</version>
</dependency>
<dependency>
<groupId>com.netflix.eureka</groupId>
<artifactId>eureka-client</artifactId>
<version>${eureka.version}</version>
......
......@@ -60,6 +60,16 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.netflix.servo</groupId>
<artifactId>servo-core</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.netflix.netflix-commons</groupId>
<artifactId>netflix-commons-util</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.netflix.governator</groupId>
<artifactId>governator</artifactId>
<optional>true</optional>
......@@ -175,7 +185,7 @@
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<artifactId>spring-boot-starter-jdbc</artifactId>
<scope>test</scope>
</dependency>
<dependency>
......
......@@ -31,12 +31,10 @@ import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.io.IOUtils;
import org.springframework.boot.actuate.trace.TraceRepository;
import org.springframework.http.HttpHeaders;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.util.StringUtils;
import org.springframework.web.util.UriUtils;
import org.springframework.web.util.WebUtils;
......@@ -260,10 +258,10 @@ public class ProxyRequestHelper {
return;
}
char[] buffer = new char[4096];
int count = IOUtils.read(new InputStreamReader(inputStream, Charset.forName("UTF-8")),
buffer);
String entity = new String(buffer).substring(0, count);
if (StringUtils.hasText(entity)) {
int count = new InputStreamReader(inputStream, Charset.forName("UTF-8"))
.read(buffer, 0, buffer.length);
if (count > 0) {
String entity = new String(buffer).substring(0, count);
info.put("body", entity.length() < 4096 ? entity : entity + "<truncated>");
}
}
......
......@@ -52,7 +52,7 @@ public class Servlet30WrapperFilter extends ZuulFilter {
@Override
public int filterOrder() {
return 0;
return -2;
}
@Override
......
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