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)
This commit is contained in:
13
pom.xml
13
pom.xml
@@ -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>
|
||||
@@ -173,6 +174,11 @@
|
||||
<type>pom</type>
|
||||
<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>
|
||||
@@ -209,6 +215,11 @@
|
||||
<artifactId>jersey-apache-client4</artifactId>
|
||||
<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>
|
||||
|
||||
@@ -59,6 +59,16 @@
|
||||
<artifactId>eureka-client</artifactId>
|
||||
<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>
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user