Handle trailing slash redirects properly. (#707)
Handle trailing slash redirects properly. (#707)

* Handle trailing slash redirects properly.

Currently we have behavior so that if:

* A `/some-path/`route exists.
* A `/some-path` route does not exist.

Then if a request to `/some-path` is made, we'll redirect to the trailing slash case.

We ought to also handle the converse case, so that if...

* A `/some-path`route exists.
* A `/some-path/` route does not exist.

Then if a request to `/some-path/` is made, we'll redirect to the no trailing slash case.

Closes #633

* Update routing.py

* Update routing.py

encode/starlette,encode/starlette