MCPcopy Create free account
hub / github.com/sqlmapproject/sqlmap / _mount_app

Method _mount_app

thirdparty/bottle/bottle.py:739–760  ·  view source on GitHub ↗
(self, prefix, app, **options)

Source from the content-addressed store, hash-verified

737 self.route('/' + '/'.join(segments), **options)
738
739 def _mount_app(self, prefix, app, **options):
740 if app in self._mounts or '_mount.app' in app.config:
741 depr(0, 13, "Application mounted multiple times. Falling back to WSGI mount.",
742 "Clone application before mounting to a different location.")
743 return self._mount_wsgi(prefix, app, **options)
744
745 if options:
746 depr(0, 13, "Unsupported mount options. Falling back to WSGI mount.",
747 "Do not specify any route options when mounting bottle application.")
748 return self._mount_wsgi(prefix, app, **options)
749
750 if not prefix.endswith("/"):
751 depr(0, 13, "Prefix must end in '/'. Falling back to WSGI mount.",
752 "Consider adding an explicit redirect from '/prefix' to '/prefix/' in the parent application.")
753 return self._mount_wsgi(prefix, app, **options)
754
755 self._mounts.append(app)
756 app.config['_mount.prefix'] = prefix
757 app.config['_mount.app'] = self
758 for route in app.routes:
759 route.rule = prefix + route.rule.lstrip('/')
760 self.add_route(route)
761
762 def mount(self, prefix, app, **options):
763 """ Mount an application (:class:`Bottle` or plain WSGI) to a specific

Callers 1

mountMethod · 0.95

Calls 4

_mount_wsgiMethod · 0.95
add_routeMethod · 0.95
deprFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected