Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
spring-cloud-netflix
Commits
532627fa
Commit
532627fa
authored
Jun 16, 2016
by
Spencer Gibb
Committed by
GitHub
Jun 16, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1106 from spring-cloud/zuul-122
Upgrade to zuul 1.2.2
parents
02948657
aa23660d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
95 deletions
+11
-95
Servlet30RequestWrapper.java
...oud/netflix/zuul/filters/pre/Servlet30RequestWrapper.java
+9
-87
SampleZuulProxyApplicationTests.java
...k/cloud/netflix/zuul/SampleZuulProxyApplicationTests.java
+0
-5
application.yml
spring-cloud-netflix-core/src/test/resources/application.yml
+1
-2
pom.xml
spring-cloud-netflix-dependencies/pom.xml
+1
-1
No files found.
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/pre/Servlet30RequestWrapper.java
View file @
532627fa
/*
* Copyright 2013-201
5
the original author or authors.
* Copyright 2013-201
6
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
}
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/SampleZuulProxyApplicationTests.java
View file @
532627fa
...
...
@@ -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
;
...
...
spring-cloud-netflix-core/src/test/resources/application.yml
View file @
532627fa
...
...
@@ -48,4 +48,4 @@ zuul:
feignClient
:
localappName
:
localapp
methodLevelRequestMappingPath
:
/hello2
myPlaceholderHeader
:
myPlaceholderHeaderValue
\ No newline at end of file
myPlaceholderHeader
:
myPlaceholderHeaderValue
spring-cloud-netflix-dependencies/pom.xml
View file @
532627fa
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment