| 104 | | for mount_point, wsgi_app in server.mount_points: |
|---|
| 105 | | if path == "*": |
|---|
| 106 | | # This means, of course, that the first wsgi_app will |
|---|
| 107 | | # always handle a URI of "*". |
|---|
| 108 | | self.environ["SCRIPT_NAME"] = "" |
|---|
| 109 | | self.environ["PATH_INFO"] = "*" |
|---|
| 110 | | self.wsgi_app = wsgi_app |
|---|
| 111 | | break |
|---|
| 112 | | # The mount_points list should be sorted by length, descending. |
|---|
| 113 | | if path.startswith(mount_point): |
|---|
| 114 | | self.environ["SCRIPT_NAME"] = mount_point |
|---|
| 115 | | self.environ["PATH_INFO"] = path[len(mount_point):] |
|---|
| 116 | | self.wsgi_app = wsgi_app |
|---|
| 117 | | break |
|---|
| | 104 | if path == "*": |
|---|
| | 105 | # This means, of course, that the last wsgi_app (shortest path) |
|---|
| | 106 | # will always handle a URI of "*". |
|---|
| | 107 | self.environ["SCRIPT_NAME"] = "" |
|---|
| | 108 | self.environ["PATH_INFO"] = "*" |
|---|
| | 109 | self.wsgi_app = server.mount_points[-1][1] |
|---|