By default, bottle installs two plugins: JSONPlugin and TemplatePlugin.
TemplatePlugin is always a no-op, because none of the routes we use (like /ready) have a template parameter.
JSONPlugin could have been useful were it actually serializing all json messages. Instead it only deals with dictionaries. Ycmd has always had ycmd.handlers._JsonResponse and we will need to keep it that way. _JsonResponse makes JSONPlugin a no-op too, because, by the time we get to the JSONPlugin.apply() the response is always a str already.
Bottle.uninstall() can be passed:
An instance of an installed plugins, to uninstall that one plugin.
A type, to uninstall all plugins of that type.
True, to uninstall all plugins.
Since we are uninstalling all default plugins, we can just do handlers.app.uninstall( True ) and then install the plugins we care about - ycmd.HmacPlugin and ycmd.WatchdogPlugin.
By default, bottle installs two plugins:
JSONPlugin
andTemplatePlugin
.TemplatePlugin
is always a no-op, because none of the routes we use (like/ready
) have a template parameter.JSONPlugin
could have been useful were it actually serializing all json messages. Instead it only deals with dictionaries. Ycmd has always hadycmd.handlers._JsonResponse
and we will need to keep it that way._JsonResponse
makesJSONPlugin
a no-op too, because, by the time we get to theJSONPlugin.apply()
the response is always a str already.Bottle.uninstall()
can be passed:True
, to uninstall all plugins.Since we are uninstalling all default plugins, we can just do
handlers.app.uninstall( True )
and then install the plugins we care about -ycmd.HmacPlugin
andycmd.WatchdogPlugin
.This change is![Reviewable](https://reviewable.io/review_button.svg)