spring-cloud-netflix: GET request 411 error on zuul proxy for eureka clients.
After updating to Camden release, previously reported issue #1042 (411 content length required) is appearing again for GET
requests.
I’ve following config on my small demo app. :
zuul:
ignoredServices: '*'
routes:
rs: /api/rs/**
httpbin:
path: /api/httpbin/**
url: http://httpbin.org
I’ve 2 routes: eureka client rs
and direct proxy for httpbin
.
Eureka client was throwing 411 error on GET requests. The difference was eureka client is setting unnecessary additional Transfer-Encoding: chunked
header.
If we can’t remove this header, I think we can set Content-Length: 0
, as it was handled previously.
My config app is running with simple default config (no custom RibbonCommandFactory
):
@SpringBootApplication
@EnableZuulProxy
@EnableDiscoveryClient
public class Zuul411Application {
public static void main(String[] args) {
SpringApplication.run(Zuul411Application.class, args);
}
}
p.s This issue is only apparent for certain network and ISPs.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (10 by maintainers)
Commits related to this issue
- Don't set chunked encoding with GET. fixes gh-1824 — committed to spring-cloud/spring-cloud-netflix by spencergibb 7 years ago
- Don't set chunked encoding with GET. fixes gh-1824 — committed to spring-cloud/spring-cloud-netflix by spencergibb 7 years ago
@beku8 please open a separate issue
Cherry-picked to master 62408af5eae2c02e3391146bf67082a85e3d8a62