diff options
Diffstat (limited to 'pyramid/config/predicates.py')
| -rw-r--r-- | pyramid/config/predicates.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pyramid/config/predicates.py b/pyramid/config/predicates.py index 311d47860..9e0ee28c1 100644 --- a/pyramid/config/predicates.py +++ b/pyramid/config/predicates.py @@ -29,7 +29,11 @@ class XHRPredicate(object): class RequestMethodPredicate(object): def __init__(self, val, config): - self.val = as_sorted_tuple(val) + request_method = as_sorted_tuple(val) + if 'GET' in request_method and 'HEAD' not in request_method: + # GET implies HEAD too + request_method = as_sorted_tuple(request_method + ('HEAD',)) + self.val = request_method def text(self): return 'request_method = %s' % (','.join(self.val)) |
