[3.7] bpo-35647: Fix path check in cookiejar (GH-11436) by miss-islington · Pull Request #12267 · python/cpython

@tirkarthi @miss-islington

* Refactor cookie path check as per RFC 6265

* Add tests for prefix match of path

* Add news entry

* Fix set_ok_path and refactor tests

* Use slice for last letter
(cherry picked from commit 0e1f1f0)

Co-authored-by: Xtreak <tir.karthi@gmail.com>

orsenthil