📝 Incorrect empty response check in `_check_empty_response_body` (#1340)
django-modern-rest/dmr/validation/endpoint_metadata.py
Lines 151 to 160 in a2d44b1
There are several things that are broken here:
1.
response.status_code < HTTPStatus.CONTINUE must be response.status_code < HTTPStatus.OK, because there are no status codes less than 100. See RFC 91102.
205 Reset Content must be in the no-body set: https://www.rfc-editor.org/rfc/rfc9110.html#name-205-reset-content3. The set should not be created on each call, create a frozenset per-class once
4.
HEAD methods must not return a body. This needs an extra rule(please, do not take this issue before the 1st of September)
#bug #good_first_issue #help_wanted #opensource_september #django_modern_rest
sent via relator