mdn / translated-content

The source repository of all translated content for MDN Web Docs
https://developer.mozilla.org/en-US/docs/MDN/Community/Contributing/Translated_content
Other
1.69k stars 8.05k forks source link

[fr] Does DELETE permit body? #23258

Open sbouchard-spordle opened 2 months ago

sbouchard-spordle commented 2 months ago

MDN URL

https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE

What specific section or headline is this issue about?

DELETE

What information was incorrect, unhelpful, or incomplete?

My coworker and I had a discussion and since our office is bilingual (french and english) we noticed, after some arguing, that the information is different in the documentation depending on the language. I am not 100% sure which one is correct, but depending on the language you choose, the value for Request has body changes.

English: Request has body: May (meaning that is is indeed possible and supported)

French: La requête a un corps: Non (meaning that it is not possible)

Español: Petición con cuerpo: Puede (If i'm not mistaken it means that it is possible and supported)

What did you expect to see?

Every languages needs to display the same correct information

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

Josh-Cena commented 2 months ago

Interestingly this discrepancy has existed ever since MDN migrated to GitHub, so it's hard to tell which one was modified after translation. However, the spec for DELETE uses the exact same wording as for GET and HEAD:

Although request message framing is independent of the method used, content received in a DELETE request has no generally defined semantics, cannot alter the meaning or target of the request, and might lead some implementations to reject the request and close the connection because of its potential as a request smuggling attack.

However, fetch only rejects GET/HEAD with body, and not DELETE.

bsmth commented 2 months ago

Thanks for reporting and to Josh for investigating. I would also add the next spec section for some more info:

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.

It is possible, although not generally good practice unless an implementation indicates it expects a body. So May have a body is accurate IMO and the FR translation is wrong here.

Josh-Cena commented 1 month ago

Marking it as https://github.com/mdn/content/labels/to%20move because the fr version is more wrong, but I think we should add the spec excerpt above to the three method pages.