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
9add6f1e
Commit
9add6f1e
authored
Nov 26, 2014
by
Spencer Gibb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't send an entity on DELETE's through RibbonRoutingFilter
fixes gh-73
parent
c28b3252
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
RibbonRoutingFilter.java
...cloud/netflix/zuul/filters/route/RibbonRoutingFilter.java
+5
-0
SampleZuulProxyApplicationTests.java
...k/cloud/netflix/zuul/SampleZuulProxyApplicationTests.java
+1
-1
No files found.
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/route/RibbonRoutingFilter.java
View file @
9add6f1e
...
...
@@ -74,6 +74,7 @@ public class RibbonRoutingFilter extends SpringFilter {
getBean
(
RibbonClientPreprocessor
.
class
).
preprocess
(
serviceId
);
//TODO: update to ribbon-rxnetty when available
RestClient
restClient
=
getBean
(
SpringClientFactory
.
class
).
namedClient
(
serviceId
,
RestClient
.
class
);
String
uri
=
request
.
getRequestURI
();
...
...
@@ -199,6 +200,10 @@ public class RibbonRoutingFilter extends SpringFilter {
private
InputStream
getRequestBody
(
HttpServletRequest
request
)
{
InputStream
requestEntity
=
null
;
//ApacheHttpClient4Handler does not support body in delete requests
if
(
request
.
getMethod
().
equals
(
"DELETE"
))
{
return
null
;
}
try
{
requestEntity
=
(
InputStream
)
RequestContext
.
getCurrentContext
().
get
(
"requestEntity"
);
...
...
spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/SampleZuulProxyApplicationTests.java
View file @
9add6f1e
...
...
@@ -32,7 +32,7 @@ public class SampleZuulProxyApplicationTests {
private
ZuulHandlerMapping
mapping
;
@Test
public
void
deleteOnSelf
()
{
public
void
deleteOnSelf
ViaSimpleHostRoutingFilter
()
{
routes
.
getRoutes
().
put
(
"/self/**"
,
"http://localhost:"
+
port
+
"/local"
);
mapping
.
registerHandlers
(
routes
.
getRoutes
());
ResponseEntity
<
String
>
result
=
new
TestRestTemplate
().
exchange
(
"http://localhost:"
+
port
+
"/self/1"
,
...
...
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