-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default Client does not include Content-Length header for POST with Empty Body #1229
Comments
Should be a simple change around this What client are you using? Default one? if so, i gave you the correct link. |
We are including spring-cloud-openfeign so I suppose we use the FeignBlockingLoadBalancerClient client class. |
@brennerm can you please confirm with the Spring Cloud team that they are passing this through to us first? |
In this case, only the default |
Is there any workaround for this?? |
@kdavisk6 still need help for this? |
I had the same problem, and solved sending an empty string. |
If you are using POST/PUT method with RequestParam, instead of this, try using Request body, cause with empty body Feign Client will send Content-Length: 0, and you will face "Length Required" problem |
Have the same problem |
Also having this issue. Any idea on an ETA of a fix? |
hi @tcolombo08 feign is mainly driven by volunteer work. ETA depends on someone that is affected by this issue getting involved. |
We are using Feign 10.7.4 to execute a POST request with an empty body. In this case Feign does not add a Content-Length header to the request. According to the HTTP specification this is fine but some proxies, in our case Azure API Management, do not accept POST request with no Content-Length header. Would it be possible to add a
Content-Length: 0
header to PATCH, POST and PUT requests with an empty body?Further context:
The text was updated successfully, but these errors were encountered: