Fixed bug causing wrong application to be called for websocket requests
(I'm too stupid to use Bitbucket's pull requests, sorry.)
Unless I'm mistaken, Resource.apps should not be a dictionary because the order of dictionary items is undefined, whereas the order of the apps is important.
This change in resource.py fixes it:
def _app_by_path(self, environ_path): # Which app matched the current path?
- for path, app in self.apps.iteritems():
- for (path, app) in self.apps:
apps becomes a list of tuples.
You'll need to adapt at least one example, probably.