Description
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:
- WebClient: Multipart POST doesn't work [SPR-15948] #20501 WebClient: Multipart POST doesn't work
- Delegating File downloads sends incomplete chunks [SPR-15949] #22194 Delegating File downloads sends incomplete chunks