]> www.vanbest.org Git - motioneye-debian/commitdiff
the HEAD method is now supported
authorCalin Crisan <ccrisan@gmail.com>
Wed, 18 May 2016 20:08:13 +0000 (23:08 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Wed, 18 May 2016 20:08:13 +0000 (23:08 +0300)
motioneye/handlers.py

index ab79f3204908f15a894806a4c703b35a9ab77f48..a0b8b7faa09197b9ddb673c9ec99412305a84585 100644 (file)
@@ -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):