From a58c4a4968053314be39aae62eed3c7a9c863e40 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 7 Sep 2010 20:27:17 +0000 Subject: - Use ``hash()`` rather than ``id()`` when computing the "phash" of a custom route/view predicate in order to allow the custom predicate some control over which predicates are "equal". - Use ``response.headerlist.append`` instead of ``response.headers.add`` in ``repoze.bfg.request.add_global_response_headers`` in case the response is not a WebOb response. --- repoze/bfg/request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'repoze/bfg/request.py') diff --git a/repoze/bfg/request.py b/repoze/bfg/request.py index c9422e24d..6318faf5a 100644 --- a/repoze/bfg/request.py +++ b/repoze/bfg/request.py @@ -154,7 +154,7 @@ def route_request_iface(name, bases=()): def add_global_response_headers(request, headerlist): def add_headers(request, response): for k, v in headerlist: - response.headers.add(k, v) + response.headerlist.append((k, v)) request.add_response_callback(add_headers) from repoze.bfg.threadlocal import get_current_request as get_request # b/c -- cgit v1.2.3