From 503bbbcffa95694448ea14143de09c3b49662eb4 Mon Sep 17 00:00:00 2001 From: Daniel Holmstrom Date: Sat, 6 Apr 2013 19:41:04 +0200 Subject: Documentation regarding missing Accept header If a request doesn't contain an Accept header routes will match it regardless of thier accept attribute. --- pyramid/config/routes.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyramid/config/routes.py b/pyramid/config/routes.py index 7a7bbae1a..f495794b4 100644 --- a/pyramid/config/routes.py +++ b/pyramid/config/routes.py @@ -235,7 +235,8 @@ class RoutesConfiguratorMixin(object): wildcard mimetype match token in the form ``text/*`` or a match-all wildcard mimetype match token in the form ``*/*``. If any of the forms matches the ``Accept`` header of the - request, this predicate will be true. If this predicate + request, or if the ``Accept`` header isn't set at all in the + request, this predicate will be true. If this predicate returns ``False``, route matching continues. effective_principals @@ -517,7 +518,7 @@ class RoutesConfiguratorMixin(object): ('traverse', p.TraversePredicate), ): self.add_route_predicate(name, factory) - + def get_routes_mapper(self): """ Return the :term:`routes mapper` object associated with this configurator's :term:`registry`.""" -- cgit v1.2.3