You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
self.action is set to None during HEAD request #6196
Activity
xordoquy commentedon Sep 19, 2018
This is a side effect of:
headThe
self.actionmapping is performed hereOskarPersson commentedon Sep 19, 2018
One fix seems to be to just add 'head' with the same value as 'get' to the mappings in SimpleRouter: https://github.com/encode/django-rest-framework/blob/master/rest_framework/routers.py#L123.
Not sure how it should be tested and if it creates some other problems though.
xordoquy commentedon Sep 19, 2018
indeed. I don't see any side effect and it doesn't look like the mapping is tested.
We'll need to add a line about it in the release note though.
Sinkler commentedon Apr 3, 2019
One more action is needed to fix it for dynamic (detail) routes: add
headhere or here something like this:Bitblade commentedon Mar 7, 2020
It doesn't seem this was implemented yet, so I made these workarounds.