Skip to content
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

Ensure body is sent when DELETE and Transfer-Encoding #3481

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

violetagg
Copy link
Member

According to the spec https://www.rfc-editor.org/rfc/rfc9110.html#name-delete

A client SHOULD NOT generate content in a DELETE request unless it is made
directly to an origin server that has previously indicated, in or out of band, that
such a request has a purpose and will be adequately supported.

When a user sends DELETE with content this means there is an indication that the server supports this type of requests.

According to the spec https://www.rfc-editor.org/rfc/rfc9110.html#name-delete

```
A client SHOULD NOT generate content in a DELETE request unless it is made
directly to an origin server that has previously indicated, in or out of band, that
such a request has a purpose and will be adequately supported.
```

When a user sends DELETE with content this means there is an indication that
the server supports this type of requests.
@violetagg violetagg added the type/bug A general bug label Oct 23, 2024
@violetagg violetagg added this to the 1.1.24 milestone Oct 23, 2024
@violetagg violetagg merged commit 4c835a3 into 1.1.x Oct 24, 2024
14 checks passed
@violetagg violetagg deleted the delete-request branch October 24, 2024 05:51
violetagg added a commit that referenced this pull request Oct 24, 2024
violetagg added a commit that referenced this pull request Oct 24, 2024
@bachah
Copy link

bachah commented Dec 17, 2024

Hi @violetagg ,

The side-effect of that change is that now the reactive webClient adds by default the 'transfer-encoding: chunked' on DELETE even when there's no body sent.

Here's a quick inline test example:
WebClient.builder().build().method(DELETE).uri(full-delete-uri).retrieve().bodyToMono(Void.class)

This forces a workaround to add 'content-length: 0' to avoid errors from the server. Was this regression taken into consideration during the change?
Since it's not backward compatible and it's not a general practice to have a body in the DELETE, why was that change done?

Thanks!

@violetagg
Copy link
Member Author

@bachah Please open a new issue in order to track this regression. Thanks

violetagg added a commit that referenced this pull request Dec 17, 2024
violetagg added a commit that referenced this pull request Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants