From 0d78dd0f2655b59f9e54eb7692bc3f49fb3e454a Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Wed, 18 May 2016 23:08:13 +0300 Subject: [PATCH] the HEAD method is now supported --- motioneye/handlers.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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): -- 2.39.5