diff options
| author | Nikolaus Schlemm | 2013-05-18 17:38:47 +0200 |
|---|---|---|
| committer | Nikolaus Schlemm | 2013-05-18 17:38:47 +0200 |
| commit | 5ab7cc6e6be5445bc0d4ccc26f1ec84239af74d5 (patch) | |
| tree | 8bc69d4c37753add90aa1beba8be3227632eb1d1 /rest_framework/views.py | |
| parent | b225b1d5c9cd8e2bec289f5da795637385b2cbe6 (diff) | |
| download | django-rest-framework-5ab7cc6e6be5445bc0d4ccc26f1ec84239af74d5.tar.bz2 | |
HEAD and OPTIONS should not be exposed as actions as discussed in https://github.com/nschlemm/django-rest-framework/commit/a42afa04c38afe25c9032b8ce37b572678b02cf1#commitcomment-3241476
Diffstat (limited to 'rest_framework/views.py')
| -rw-r--r-- | rest_framework/views.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rest_framework/views.py b/rest_framework/views.py index 719df428..c5b89a02 100644 --- a/rest_framework/views.py +++ b/rest_framework/views.py @@ -71,6 +71,10 @@ class APIView(View): actions = {} for method in self.allowed_methods: + # skip HEAD and OPTIONS + if method in ('HEAD', 'OPTIONS'): + continue + cloned_request = clone_request(request, method) try: self.check_permissions(cloned_request) |
