Skip to content

Explicitly setting content_type=None for responses without a body. #251

Description

@axelsrz

[nitpick] The accepted() method doesn't set a body, but the HttpResponse dataclass defaults content_type to "application/json". This could lead to a response with a Content-Type header but no body. Consider explicitly setting content_type=None for responses without a body.

        return HttpResponse(status_code=202, content_type=None)

Originally posted by @Copilot in #221 (comment)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions