Retry http POST sent without body
See original GitHub issueHi, Using ribbon’s retry policy works perfect with GET requests. However, for http POST, after failing the first try for routing, the request is sent without the body.
After debugging the code, the second request (HttpRequest object in AbstractLoadBalancerAwareClient.executeWithLoadBalancer) has the same “entity” object (ServletInputStreamWrapper). Since this entity was read in the first try, its index now pointing to the end of stream, resulting in an empty body transferred to the inner microservice.
Is this a bug or improper use/configuration ?
my configuration:
ribbon:
OkToRetryOnAllOperations: true
zuul:
microservice:
path: /microservice/**
serviceId: microservice
retryable: true
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
How to retry HTTP POST requests - Stack Overflow
1 Answer 1 ... To be able to reuse a request whose body is non-nil, you first need to make sure that the...
Read more >How Linkerd retries HTTP requests with bodies
Retrying a request with a body may sound simple (just send the body again, right?), but it's not that straightforward. In order to...
Read more >Retry a request until it succeeds. - R-Project.org
FALSE : No body. This is typically not used with POST , PUT , or PATCH , but can be useful if you...
Read more >Retry a request until it succeeds. - httr
FALSE : No body. This is typically not used with POST , PUT , or PATCH , but can be useful if you...
Read more >HTTP/1.1: Header Field Definitions
If an Accept-Charset header is present, and if the server cannot send a response ... If no Accept-Encoding field is present in a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi guys, what workaround did you use? Could you please describe if you have time? Thanks.
Conversations about Spring Cloud aren’t appropriate here.