Skip to content

Commit

Permalink
Merge pull request #499 from Cornices/remote-useage-best-match
Browse files Browse the repository at this point in the history
Remove remaining usage of best_match()
  • Loading branch information
leplatrem committed Dec 12, 2018
2 parents 2dcadf8 + 853537a commit c37a24f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ CHANGELOG
3.5.0 (unreleased)
==================

- Nothing changed yet.
**Internal changes**

- Remove remaining usage of deprecated ``.best_match()``


3.4.3 (2018-11-30)
Expand Down
2 changes: 1 addition & 1 deletion cornice/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def match_accept_header(func, context, request):
"""
acceptable = to_list(func(request))
request.info['acceptable'] = acceptable
return request.accept.best_match(acceptable) is not None
return len(request.accept.acceptable_offers(acceptable)) > 0


def match_content_type_header(func, context, request):
Expand Down

0 comments on commit c37a24f

Please sign in to comment.