Skip to content

Content-Type header sent in HTTP 204 responses #247

@Anthony-Stannard

Description

@Anthony-Stannard

A successful request to /auth/invalidate-sessions will result in an HTTP 204 response being returned.
The HTTP 204 response will have a Content-Type header when it shouldn't have this header.

A simple fix would be to remove the empty dictionary from the POST Response in the InvalidateSessions and InvalidateRefreshTokens class:

Current line 281 in views.py
return Response({}, status=HTTP_204_NO_CONTENT)

Can be fixed with:
return Response(status=HTTP_204_NO_CONTENT)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions