Skip to content

WebClient: DELETE request should not send transfer-encoding: chunked header [SPR-15947] #20500

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

Closed
spring-projects-issues opened this issue Sep 10, 2017 · 2 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Sep 10, 2017

Abhijit Sarkar opened SPR-15947 and commented

Using 5.0.0.BUILD-SNAPSHOT, not RC3.

The WebClient sends a transfer-encoding: chunked header for all requests which confuses some servers and cause a timeout. The spec says that for some request methods like GET, HEAD, DELETE, the request body, even if present, should be ignored, so for all practical purposes, there is no body. Thus it doesn't make sense to add a transfer-encoding: chunked. See this exact same bug raised and fixed for NodeJS: nodejs/node-v0.x-archive#6185.

As for our case, Pinterest API chokes on this. Here's a sample curl statement, where the access_token has been replaced with a fake one for obvious reasons.

curl -v -X DELETE -H "User-Agent: ReactorNetty/0.7.0.BUILD-SNAPSHOT" -H "Transfer-Encoding: chunked" -H "Accept-Encoding: gzip" -H "Accept: application/json" "https:/api.pinterest.com/v1/boards/sarkara1/test/?access_token=xxx"

The workaround for this is to set the header to null before making the request, which removes it from the header map. Needless to say, the workaround is ugly and shouldn't be required in the first place.


Affects: 5.0 RC3

Issue Links:

@spring-projects-issues
Copy link
Collaborator Author

Brian Clozel commented

See reactor/reactor-netty#166

@spring-projects-issues
Copy link
Collaborator Author

Brian Clozel commented

Solved in Reactor Bismuth-RC1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants