Commit 532627fa by Spencer Gibb Committed by GitHub

Merge pull request #1106 from spring-cloud/zuul-122

Upgrade to zuul 1.2.2
parents 02948657 aa23660d
/*
* Copyright 2013-2015 the original author or authors.
* Copyright 2013-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -16,20 +16,9 @@
package org.springframework.cloud.netflix.zuul.filters.pre;
import java.io.IOException;
import java.util.Collection;
import com.netflix.zuul.http.HttpServletRequestWrapper;
import javax.servlet.AsyncContext;
import javax.servlet.DispatcherType;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.Part;
import com.netflix.zuul.http.HttpServletRequestWrapper;
class Servlet30RequestWrapper extends HttpServletRequestWrapper {
private HttpServletRequest request;
......@@ -39,78 +28,12 @@ class Servlet30RequestWrapper extends HttpServletRequestWrapper {
this.request = request;
}
/**
* There is a bug in zuul 1.2.2 where HttpServletRequestWrapper.getRequest returns a wrapped request rather than the raw one.
* @return the original HttpServletRequest
*/
@Override
public boolean authenticate(HttpServletResponse response) throws IOException,
ServletException {
return this.request.authenticate(response);
}
@Override
public void login(String username, String password) throws ServletException {
this.request.login(username, password);
public HttpServletRequest getRequest() {
return this.request;
}
@Override
public void logout() throws ServletException {
this.request.logout();
}
@Override
public Collection<Part> getParts() throws IOException, IllegalStateException,
ServletException {
return this.request.getParts();
}
@Override
public Part getPart(String name) throws IOException, IllegalStateException,
ServletException {
return this.request.getPart(name);
}
@Override
public ServletContext getServletContext() {
return this.request.getServletContext();
}
@Override
public AsyncContext startAsync() {
return this.request.startAsync();
}
@Override
public AsyncContext startAsync(ServletRequest servletRequest,
ServletResponse servletResponse) {
return this.request.startAsync(servletRequest, servletResponse);
}
@Override
public boolean isAsyncStarted() {
try {
return this.request.isAsyncStarted();
}
catch (Throwable e) {
return false;
}
}
@Override
public boolean isAsyncSupported() {
try {
return this.request.isAsyncSupported();
}
catch (Throwable e) {
return false;
}
}
@Override
public AsyncContext getAsyncContext() {
return this.request.getAsyncContext();
}
@Override
public DispatcherType getDispatcherType() {
return this.request.getDispatcherType();
}
}
\ No newline at end of file
}
......@@ -18,21 +18,16 @@ package org.springframework.cloud.netflix.zuul;
import java.io.InputStream;
import java.net.URISyntaxException;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.servlet.http.HttpServletRequest;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.web.BasicErrorController;
import org.springframework.boot.autoconfigure.web.ErrorAttributes;
import org.springframework.boot.autoconfigure.web.ErrorProperties;
import org.springframework.boot.test.IntegrationTest;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.boot.test.TestRestTemplate;
......
......@@ -48,4 +48,4 @@ zuul:
feignClient:
localappName: localapp
methodLevelRequestMappingPath: /hello2
myPlaceholderHeader: myPlaceholderHeaderValue
\ No newline at end of file
myPlaceholderHeader: myPlaceholderHeaderValue
......@@ -23,7 +23,7 @@
<hystrix.version>1.5.3</hystrix.version>
<ribbon.version>2.2.0</ribbon.version>
<servo.version>0.10.1</servo.version>
<zuul.version>1.1.0</zuul.version>
<zuul.version>1.2.2</zuul.version>
<rxjava.version>1.1.5</rxjava.version>
<java.version>1.7</java.version>
<turbine.version>1.0.0</turbine.version>
......
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