From: Calin Crisan Date: Wed, 18 May 2016 20:08:13 +0000 (+0300) Subject: the HEAD method is now supported X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=0d78dd0f2655b59f9e54eb7692bc3f49fb3e454a;p=motioneye-debian the HEAD method is now supported --- diff --git a/motioneye/handlers.py b/motioneye/handlers.py index ab79f32..a0b8b7f 100644 --- a/motioneye/handlers.py +++ b/motioneye/handlers.py @@ -87,6 +87,12 @@ class BaseHandler(RequestHandler): argument = default return argument + + def finish(self, chunk=None): + import motioneye + + self.set_header('Server', 'motionEye/%s' % motioneye.VERSION) + RequestHandler.finish(self, chunk=chunk) def render(self, template_name, content_type='text/html', **context): self.set_header('Content-Type', content_type) @@ -197,6 +203,9 @@ class MainHandler(BaseHandler): admin_username=config.get_main().get('@admin_username'), old_motion=config.is_old_motion(), has_motion=bool(motionctl.find_motion())) + + def head(self): + self.finish() class ConfigHandler(BaseHandler):