Pylons/pyramid — pull request #1259 by dobesv (2014-03-05 19:19:55+00:00)
Title: Preserve order of views using "accept"

Our code assumes that the first configured `accept` predicate will be picked if the client sends `Accept: */*` or no `Accept` header at all. However, when multiple views are added with different `accept` values, they may be shuffled around by the current call to `set()` and the one selected by `Accept: */*` is not the first one configured. This patch ensures the media types are offered in the same order they were configured in.