summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Holmstrom <holmstrom.daniel@gmail.com>2013-04-06 19:41:04 +0200
committerDaniel Holmstrom <holmstrom.daniel@gmail.com>2013-04-06 19:41:04 +0200
commit503bbbcffa95694448ea14143de09c3b49662eb4 (patch)
tree1410938e5401f4cb7ecb84fb171ba47232642ce7
parent74a4e377d64e0e44ebea841feed90333c6c7088f (diff)
downloadpyramid-503bbbcffa95694448ea14143de09c3b49662eb4.tar.gz
pyramid-503bbbcffa95694448ea14143de09c3b49662eb4.tar.bz2
pyramid-503bbbcffa95694448ea14143de09c3b49662eb4.zip
Documentation regarding missing Accept header
If a request doesn't contain an Accept header routes will match it regardless of thier accept attribute.
-rw-r--r--pyramid/config/routes.py5
1 files 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`."""